diff options
author | Simon Green <sgreen@redhat.com> | 2014-04-15 11:28:32 +1000 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-04-15 11:28:32 +1000 |
commit | 0b6c84fce0d844df7b5dfd56b2894239c267c079 (patch) | |
tree | 771fdd22abc4894efaaca2d99edb1991b5349ed4 | |
parent | Bug 987205: Bugzilla crashes because it tries to import a non-exported login_... (diff) | |
download | bugzilla-0b6c84fce0d844df7b5dfd56b2894239c267c079.tar.gz bugzilla-0b6c84fce0d844df7b5dfd56b2894239c267c079.tar.bz2 bugzilla-0b6c84fce0d844df7b5dfd56b2894239c267c079.zip |
Bug 995873 - Don't use replaceState if it would result in an invalid URL
r=justdave, a=justdave
-rw-r--r-- | template/en/default/list/list.html.tmpl | 12 |
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 4e6bdfd90..e179a90e4 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 %] |