projects
/
claws.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug 3561, 'HTML <a> tag with no href makes message display incorrectly.'
[claws.git]
/
src
/
html.c
diff --git
a/src/html.c
b/src/html.c
index 19cb52c843ff64ed81d4a04ebc5ac5fcd9a5e199..72df9464449d52e5b86311c9577f96a66d6d4066 100644
(file)
--- a/
src/html.c
+++ b/
src/html.c
@@
-649,6
+649,7
@@
static SC_HTMLState sc_html_parse_tag(SC_HTMLParser *parser)
parser->state = SC_HTML_BR;
} else if (!strcmp(tag->name, "a")) {
GList *cur;
parser->state = SC_HTML_BR;
} else if (!strcmp(tag->name, "a")) {
GList *cur;
+ parser->href = NULL;
for (cur = tag->attr; cur != NULL; cur = cur->next) {
if (cur->data && !strcmp(((SC_HTMLAttr *)cur->data)->name, "href")) {
g_free(parser->href);
for (cur = tag->attr; cur != NULL; cur = cur->next) {
if (cur->data && !strcmp(((SC_HTMLAttr *)cur->data)->name, "href")) {
g_free(parser->href);
@@
-658,6
+659,8
@@
static SC_HTMLState sc_html_parse_tag(SC_HTMLParser *parser)
break;
}
}
break;
}
}
+ if (parser->href == NULL)
+ parser->href = g_strdup("");
parser->state = SC_HTML_HREF_BEG;
} else if (!strcmp(tag->name, "/a")) {
parser->state = SC_HTML_HREF;
parser->state = SC_HTML_HREF_BEG;
} else if (!strcmp(tag->name, "/a")) {
parser->state = SC_HTML_HREF;