-2001-11-04 [alfons]
+2001-11-04 [alfons] 0.6.4claws24
+
+ * src/textview.c
+ fix bug reported by Kim Schulz. introduced by the patch integrated
+ in 0.6.4claws15. the code did not check the return value of
+ the html parser.
* AUTHORS
add Jonathan Ware and close "[ #475955 ] Enhanced Mailto Patch"
if (parser->state == HTML_HREF) {
/* first time : get and copy the URL */
if (url == NULL) {
- url = strdup(strtok(str, " "));
- /* the URL may (or not) be followed by the
- * referenced text */
- str = strtok(NULL, "");
+ /* ALF - the sylpheed html parser returns an empty string,
+ * if still inside an <a>, but already parsed past HREF */
+ str = strtok(str, " ");
+ if (str) {
+ url = strdup(str);
+ /* the URL may (or not) be followed by the
+ * referenced text */
+ str = strtok(NULL, "");
+ }
}
if (str != NULL) {
textview_write_link(textview, url, str, NULL);