summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-04-15 03:28:11 +0200
committerSimon Green <sgreen@redhat.com>2014-04-15 03:28:11 +0200
commit55a157391962f5efae0bcd22ad8740a4ca760591 (patch)
treef562c35511e89bbd13bc0da70a4e5748134a58bb /template/en
parentdb8d9946f92f847a26bca5eb45f31ecaf7f031dd (diff)
downloadbugzilla-55a157391962f5efae0bcd22ad8740a4ca760591.tar.gz
bugzilla-55a157391962f5efae0bcd22ad8740a4ca760591.tar.xz
Bug 995873 - Don't use replaceState if it would result in an invalid URL
r=justdave, a=justdave
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/list/list.html.tmpl12
1 files changed, 7 insertions, 5 deletions
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index de289e3dd..c85564d27 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -43,11 +43,13 @@
[% new_param = cgi.canonicalise_query %]
[% END %]
- if (history && history.replaceState) {
- history.replaceState(null, "[% unfiltered_title FILTER js %]",
- "buglist.cgi?[% new_param FILTER js %]");
- document.title = "[% unfiltered_title FILTER js %]";
- }
+ [% IF new_param.length + 12 < constants.CGI_URI_LIMIT %]
+ if (history && history.replaceState) {
+ history.replaceState(null, "[% unfiltered_title FILTER js %]",
+ "buglist.cgi?[% new_param FILTER js %]");
+ document.title = "[% unfiltered_title FILTER js %]";
+ }
+ [% END %]
[% javascript FILTER none %]
[% END %]