aboutsummaryrefslogtreecommitdiff
path: root/dw/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/table.cc')
-rw-r--r--dw/table.cc15
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) {