mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Fix 1546941.
svn path=/trunk/netsurf/; revision=2909
This commit is contained in:
parent
1086d53b89
commit
923d9f1365
@ -457,15 +457,19 @@ bool box_construct_element(xmlNode *n, struct content *content,
|
||||
|
||||
/* misc. attributes that can't be handled in box_get_style() */
|
||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "colspan"))) {
|
||||
box->columns = strtol(s, NULL, 10);
|
||||
if (MAX_SPAN < box->columns)
|
||||
box->columns = 1;
|
||||
if (isdigit(s[0])) {
|
||||
box->columns = strtol(s, NULL, 10);
|
||||
if ((MAX_SPAN < box->columns) || (box->columns < 1))
|
||||
box->columns = 1;
|
||||
}
|
||||
xmlFree(s);
|
||||
}
|
||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "rowspan"))) {
|
||||
box->rows = strtol(s, NULL, 10);
|
||||
if (MAX_SPAN < box->rows)
|
||||
box->rows = 1;
|
||||
if (isdigit(s[0])) {
|
||||
box->rows = strtol(s, NULL, 10);
|
||||
if ((MAX_SPAN < box->rows) || (box->rows < 1))
|
||||
box->rows = 1;
|
||||
}
|
||||
xmlFree(s);
|
||||
}
|
||||
if (strcmp((const char *) n->name, "table") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user