Commit 0b6c84fc authored by Simon Green's avatar Simon Green

Bug 995873 - Don't use replaceState if it would result in an invalid URL

r=justdave, a=justdave
parent f5421b8a
...@@ -43,11 +43,13 @@ ...@@ -43,11 +43,13 @@
[% new_param = cgi.canonicalise_query %] [% new_param = cgi.canonicalise_query %]
[% END %] [% END %]
if (history && history.replaceState) { [% IF new_param.length + 12 < constants.CGI_URI_LIMIT %]
history.replaceState(null, "[% unfiltered_title FILTER js %]", if (history && history.replaceState) {
"buglist.cgi?[% new_param FILTER js %]"); history.replaceState(null, "[% unfiltered_title FILTER js %]",
document.title = "[% unfiltered_title FILTER js %]"; "buglist.cgi?[% new_param FILTER js %]");
} document.title = "[% unfiltered_title FILTER js %]";
}
[% END %]
[% javascript FILTER none %] [% javascript FILTER none %]
[% END %] [% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment