w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 76c27d83954eb535fe1dd8d961d01a59da4f941d
parent 96aeafcf6aacdb029587916fd379d458ccc30cb3
Author: ukai <ukai>
Date:   Fri,  6 Dec 2002 16:37:42 +0000

[w3m-dev 03535] close anchor, quote <
* file.c (HTMLtagproc1): close_anchor
* frame.c (createFrameFile): quote <
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 6++++++
Mfile.c | 9++++++++-
Mframe.c | 11++++++++++-
3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,5 +1,11 @@ 2002-12-07 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03535] close anchor, quote < + * file.c (HTMLtagproc1): close_anchor + * frame.c (createFrameFile): quote < + +2002-12-07 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03534] cleanup file.c * file.c (HTMLlineproc2body): cleanup diff --git a/file.c b/file.c @@ -4334,10 +4334,10 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit); return 0; case HTML_HR: + close_anchor(h_env, obuf); tmp = process_hr(tag, h_env->limit, envs[h_env->envc].indent); HTMLlineproc1(tmp->ptr, h_env); obuf->prevchar = ' '; - close_anchor(h_env, obuf); return 1; case HTML_PRE: x = parsedtag_exists(tag, ATTR_FOR_TABLE); @@ -4352,6 +4352,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) else fillline(obuf, envs[h_env->envc].indent); obuf->flag |= (RB_PRE | RB_IGNORE_P); + close_anchor(h_env, obuf); /* istr = str; */ return 1; case HTML_N_PRE: @@ -4398,6 +4399,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) h_env->limit); } obuf->flag |= (RB_PRE | RB_IGNORE_P); + close_anchor(h_env, obuf); return 1; case HTML_N_PRE_PLAIN: CLOSE_P; @@ -4430,6 +4432,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) obuf->end_tag = MAX_HTMLTAG; break; } + close_anchor(h_env, obuf); return 1; case HTML_N_LISTING: case HTML_N_XMP: @@ -4528,6 +4531,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) } return 0; case HTML_TABLE: + close_anchor(h_env, obuf); obuf->table_level++; if (obuf->table_level >= MAX_TABLE) break; @@ -4621,11 +4625,13 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) process_n_form(); return 1; case HTML_INPUT: + close_anchor(h_env, obuf); tmp = process_input(tag); if (tmp) HTMLlineproc1(tmp->ptr, h_env); return 1; case HTML_SELECT: + close_anchor(h_env, obuf); tmp = process_select(tag); if (tmp) HTMLlineproc1(tmp->ptr, h_env); @@ -4643,6 +4649,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) /* nothing */ return 1; case HTML_TEXTAREA: + close_anchor(h_env, obuf); tmp = process_textarea(tag, h_env->limit); if (tmp) HTMLlineproc1(tmp->ptr, h_env); diff --git a/frame.c b/frame.c @@ -600,7 +600,16 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level, continue; if (tok->ptr[0] == '<') { - is_tag = TRUE; + if (tok->ptr[1] && + REALLY_THE_BEGINNING_OF_A_TAG(tok->ptr)) + is_tag = TRUE; + else if (!(pre_mode & (RB_PLAIN | RB_INTXTA | + RB_SCRIPT | RB_STYLE))) { + p = Strnew_m_charp(tok->ptr + 1, p, NULL)->ptr; + tok = Strnew_charp("&lt;"); + } + } + if (is_tag) { if (pre_mode & (RB_PLAIN | RB_INTXTA | RB_SCRIPT | RB_STYLE)) { q = tok->ptr;