diff options
author | corvid <corvid@lavabit.com> | 2011-10-21 19:23:51 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-10-21 19:23:51 +0000 |
commit | bb81112acaf4a098192f9fe6e27491e1bd503eb6 (patch) | |
tree | 9913b08edd32ccf7c4d1cac9ff7eee2af3d99b3a /dw/table.cc | |
parent | 145079ecc61912e5bf896a081d506aeea1039e06 (diff) |
increase col/rowspan limit from 50 to 100
I get the msgs when reading wikipedia sometimes, pretty much always
with values < 100. Jorge doesn't believe there was any deep reason
behind the value of 50.
Diffstat (limited to 'dw/table.cc')
-rw-r--r-- | dw/table.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dw/table.cc b/dw/table.cc index 8a46ce7c..c21b7a09 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -270,18 +270,19 @@ core::Iterator *Table::iterator (core::Content::Type mask, bool atEnd) void Table::addCell (Widget *widget, int colspan, int rowspan) { + const int maxspan = 100; Child *child; int colspanEff; - // We limit the values for colspan and rowspan to 50, to avoid + // We limit the values for colspan and rowspan to avoid // attacks by malicious web pages. - if (colspan > 50 || colspan < 0) { - MSG_WARN("colspan = %d is set to 50.\n", colspan); - colspan = 50; + if (colspan > maxspan || colspan < 0) { + MSG_WARN("colspan = %d is set to %d.\n", colspan, maxspan); + colspan = maxspan; } - if (rowspan > 50 || rowspan <= 0) { - MSG_WARN("rowspan = %d is set to 50.\n", rowspan); - rowspan = 50; + if (rowspan > maxspan || rowspan <= 0) { + MSG_WARN("rowspan = %d is set to %d.\n", rowspan, maxspan); + rowspan = maxspan; } if (numRows == 0) { |