Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6243)

Unified Diff: chrome/browser/resources/history.html

Issue 67249: EscapeQueryParamValue differs from encodeURIComponent in that it doesn't esca... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history.html
===================================================================
--- chrome/browser/resources/history.html (revision 13872)
+++ chrome/browser/resources/history.html (working copy)
@@ -651,7 +651,7 @@
for (var i = 0; i < hashSplit.length; i++) {
var pair = hashSplit[i].split("=");
if (pair.length > 1) {
- result[pair[0]] = decodeURIComponent(pair[1]);
+ result[pair[0]] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
}
}
@@ -668,10 +668,9 @@
PageState.prototype.setUIState = function(term, page) {
// Make sure the form looks pretty.
document.forms[0].term.value = term;
-
- var hash = PageState.getHashString(term, page);
- if (window.location.hash.substr(1) != hash) {
- window.location.hash = hash;
+ var currentHash = this.getHashData();
+ if (currentHash.q != term || currentHash.p != page) {
+ window.location.hash = PageState.getHashString(term, page);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698