diff options
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/html.cc b/src/html.cc index 6f5e94ae..07590517 100644 --- a/src/html.cc +++ b/src/html.cc @@ -98,11 +98,6 @@ void *a_Html_text(const char *type, void *P, CA_Callback_t *Call,void **Data); /*----------------------------------------------------------------------------- * Forward declarations *---------------------------------------------------------------------------*/ -static const char *Html_get_attr2(DilloHtml *html, - const char *tag, - int tagsize, - const char *attrname, - int tag_parsing_flags); static int Html_write_raw(DilloHtml *html, char *buf, int bufsize, int Eof); static bool Html_load_image(BrowserWindow *bw, DilloUrl *url, const DilloUrl *requester, DilloImage *image); @@ -1151,7 +1146,7 @@ static void Html_process_word(DilloHtml *html, const char *word, int size) dStr_append_l(html->Stash, word, size); } - if (parse_mode == DILLO_HTML_PARSE_MODE_STASH || + if (parse_mode == DILLO_HTML_PARSE_MODE_STASH || parse_mode == DILLO_HTML_PARSE_MODE_VERBATIM) { /* skip until the closing instructions */ @@ -3456,8 +3451,7 @@ static void Html_parse_common_attrs(DilloHtml *html, char *tag, int tagsize) const char *attrbuf; if (tagsize >= 8 && /* length of "<t id=i>" */ - (attrbuf = Html_get_attr2(html, tag, tagsize, "id", - HTML_LeftTrim | HTML_RightTrim))) { + (attrbuf = a_Html_get_attr(html, tag, tagsize, "id"))) { /* According to the SGML declaration of HTML 4, all NAME values * occuring outside entities must be converted to uppercase * (this is what "NAMECASE GENERAL YES" says). But the HTML 4 @@ -3471,13 +3465,11 @@ static void Html_parse_common_attrs(DilloHtml *html, char *tag, int tagsize) if (tagsize >= 11 && (prefs.parse_embedded_css || prefs.load_stylesheets)) { /* length of "<t class=i>" or "<t style=i>" */ - attrbuf = Html_get_attr2(html, tag, tagsize, "class", - HTML_LeftTrim | HTML_RightTrim); + attrbuf = a_Html_get_attr(html, tag, tagsize, "class"); if (attrbuf) html->styleEngine->setClass (attrbuf); - attrbuf = Html_get_attr2(html, tag, tagsize, "style", - HTML_LeftTrim | HTML_RightTrim); + attrbuf = a_Html_get_attr(html, tag, tagsize, "style"); if (attrbuf) html->styleEngine->setStyle (attrbuf); } @@ -3486,8 +3478,7 @@ static void Html_parse_common_attrs(DilloHtml *html, char *tag, int tagsize) int hasXmlLang = 0; if (tagsize >= 14) { /* length of "<t xml:lang=i>" */ - attrbuf = Html_get_attr2(html, tag, tagsize, "xml:lang", - HTML_LeftTrim | HTML_RightTrim); + attrbuf = a_Html_get_attr(html, tag, tagsize, "xml:lang"); if (attrbuf) { html->styleEngine->setNonCssHint(PROPERTY_X_LANG, CSS_TYPE_STRING, attrbuf); @@ -3496,8 +3487,7 @@ static void Html_parse_common_attrs(DilloHtml *html, char *tag, int tagsize) } if (!hasXmlLang && tagsize >= 10) { /* 'xml:lang' prevails over 'lang' */ /* length of "<t lang=i>" */ - attrbuf = Html_get_attr2(html, tag, tagsize, "lang", - HTML_LeftTrim | HTML_RightTrim); + attrbuf = a_Html_get_attr(html, tag, tagsize, "lang"); if (attrbuf) html->styleEngine->setNonCssHint(PROPERTY_X_LANG, CSS_TYPE_STRING, attrbuf); @@ -3639,7 +3629,7 @@ static void Html_process_tag(DilloHtml *html, char *tag, int tagsize) /* Request immediate close for elements with forbidden close tag. */ /* TODO: XHTML always requires close tags. A simple implementation * of the commented clause below will make it work. */ - if (/* parsing HTML && */ Tags[ni].EndTag == 'F') + if (/* parsing HTML && */ Tags[ni].EndTag == 'F') html->ReqTagClose = true; /* Don't break! Open tags may also close themselves */ |