summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_html.class6
1 files changed, 5 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class
index 390e8ae..65d1eaa 100644
--- a/it_html.class
+++ b/it_html.class
@@ -548,7 +548,11 @@ static function U(/* ... */)
$u['query'] = it_url::params($u['params'] + $params);
}
- return $schemepart . $u['path'] . ($u['query'] ? "?" . $u['query'] : "") . ($u['fragment'] ? "#" . $u['fragment'] : "");
+ $url = $schemepart . $u['path'] . ($u['query'] ? "?" . $u['query'] : "") . ($u['fragment'] ? "#" . $u['fragment'] : "");
+ if (strlen($url) >= 2000)
+ it::error(['title' => 'url too long', 'body' => $url]);
+
+ return $url;
}