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 @@
[% 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 %]
......
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