mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-27 12:49:32 +03:00
[project @ 2004-05-11 16:40:12 by bursa]
Ignore negative colspan. svn path=/import/netsurf/; revision=851
This commit is contained in:
parent
924fe5c995
commit
52700ad3cb
@ -316,7 +316,7 @@ struct box * convert_xml_to_box(xmlNode * n, struct content *content,
|
|||||||
/* extract title attribute, if present */
|
/* extract title attribute, if present */
|
||||||
if ((title0 = xmlGetProp(n, (const xmlChar *) "title"))) {
|
if ((title0 = xmlGetProp(n, (const xmlChar *) "title"))) {
|
||||||
status.title = title = squash_tolat1(title0);
|
status.title = title = squash_tolat1(title0);
|
||||||
xfree(title0);
|
xmlFree(title0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* special elements */
|
/* special elements */
|
||||||
@ -520,8 +520,9 @@ struct box * convert_xml_to_box(xmlNode * n, struct content *content,
|
|||||||
inline_container = 0;
|
inline_container = 0;
|
||||||
|
|
||||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "colspan"))) {
|
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "colspan"))) {
|
||||||
if ((box->columns = strtol(s, 0, 10)) == 0)
|
int colspan = atoi(s);
|
||||||
box->columns = 1;
|
if (1 <= colspan && colspan <= 100)
|
||||||
|
box->columns = colspan;
|
||||||
xmlFree(s);
|
xmlFree(s);
|
||||||
}
|
}
|
||||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "rowspan"))) {
|
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "rowspan"))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user