From: Simon Green Date: Tue, 15 Apr 2014 01:28:11 +0000 (+1000) Subject: Bug 995873 - Don't use replaceState if it would result in an invalid URL X-Git-Tag: bugzilla-4.5.3~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55a157391962f5efae0bcd22ad8740a4ca760591;p=thirdparty%2Fbugzilla.git Bug 995873 - Don't use replaceState if it would result in an invalid URL r=justdave, a=justdave --- diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index de289e3dd0..c85564d273 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 %]