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"))) {
|
||||
if (isdigit(s[0])) {
|
||||
box->columns = strtol(s, NULL, 10);
|
||||
if (MAX_SPAN < box->columns)
|
||||
if ((MAX_SPAN < box->columns) || (box->columns < 1))
|
||||
box->columns = 1;
|
||||
}
|
||||
xmlFree(s);
|
||||
}
|
||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "rowspan"))) {
|
||||
if (isdigit(s[0])) {
|
||||
box->rows = strtol(s, NULL, 10);
|
||||
if (MAX_SPAN < box->rows)
|
||||
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