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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html id="t" jsvalues="dir:textdirection;"> 2 <html id="t" jsvalues="dir:textdirection;">
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title jscontent="title"></title> 5 <title jscontent="title"></title>
6 <link rel="icon" href="../../app/theme/history_favicon.png"> 6 <link rel="icon" href="../../app/theme/history_favicon.png">
7 <script type="text/javascript"> 7 <script type="text/javascript">
8 /////////////////////////////////////////////////////////////////////////////// 8 ///////////////////////////////////////////////////////////////////////////////
9 // Globals: 9 // Globals:
10 var RESULTS_PER_PAGE = 150; 10 var RESULTS_PER_PAGE = 150;
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 }; 644 };
645 645
646 if (!window.location.hash) { 646 if (!window.location.hash) {
647 return result; 647 return result;
648 } 648 }
649 649
650 var hashSplit = window.location.hash.substr(1).split("&"); 650 var hashSplit = window.location.hash.substr(1).split("&");
651 for (var i = 0; i < hashSplit.length; i++) { 651 for (var i = 0; i < hashSplit.length; i++) {
652 var pair = hashSplit[i].split("="); 652 var pair = hashSplit[i].split("=");
653 if (pair.length > 1) { 653 if (pair.length > 1) {
654 result[pair[0]] = decodeURIComponent(pair[1]); 654 result[pair[0]] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
655 } 655 }
656 } 656 }
657 657
658 return result; 658 return result;
659 } 659 }
660 660
661 /** 661 /**
662 * Set the hash to a specified state, this will create an entry in the 662 * Set the hash to a specified state, this will create an entry in the
663 * session history so the back button cycles through hash states, which 663 * session history so the back button cycles through hash states, which
664 * are then picked up by our listener. 664 * are then picked up by our listener.
665 * @param {string} term The current search string. 665 * @param {string} term The current search string.
666 * @param {string} page The page currently being viewed. 666 * @param {string} page The page currently being viewed.
667 */ 667 */
668 PageState.prototype.setUIState = function(term, page) { 668 PageState.prototype.setUIState = function(term, page) {
669 // Make sure the form looks pretty. 669 // Make sure the form looks pretty.
670 document.forms[0].term.value = term; 670 document.forms[0].term.value = term;
671 671 var currentHash = this.getHashData();
672 var hash = PageState.getHashString(term, page); 672 if (currentHash.q != term || currentHash.p != page) {
673 if (window.location.hash.substr(1) != hash) { 673 window.location.hash = PageState.getHashString(term, page);
674 window.location.hash = hash;
675 } 674 }
676 } 675 }
677 676
678 /** 677 /**
679 * Static method to get the hash string for a specified state 678 * Static method to get the hash string for a specified state
680 * @param {string} term The current search string. 679 * @param {string} term The current search string.
681 * @param {string} page The page currently being viewed. 680 * @param {string} page The page currently being viewed.
682 * @return {string} The string to be used in a hash. 681 * @return {string} The string to be used in a hash.
683 */ 682 */
684 PageState.getHashString = function(term, page) { 683 PageState.getHashString = function(term, page) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 <span id="searchresultsfor" jscontent="searchresultsfor">Search results for '% s'</span> 946 <span id="searchresultsfor" jscontent="searchresultsfor">Search results for '% s'</span>
948 <span id="history" jscontent="history">History</span> 947 <span id="history" jscontent="history">History</span>
949 <span id="cont" jscontent="cont">(cont.)</span> 948 <span id="cont" jscontent="cont">(cont.)</span>
950 <span id="noresults" jscontent="noresults">No results</span> 949 <span id="noresults" jscontent="noresults">No results</span>
951 <span id="noitems" jscontent="noitems">No items</span> 950 <span id="noitems" jscontent="noitems">No items</span>
952 <span id="deleteday" jscontent="deleteday">Delete history for this day</span> 951 <span id="deleteday" jscontent="deleteday">Delete history for this day</span>
953 <span id="deletedaywarning" jscontent="deletedaywarning">Are you sure you want to delete this day?</span> 952 <span id="deletedaywarning" jscontent="deletedaywarning">Are you sure you want to delete this day?</span>
954 </div> 953 </div>
955 </body> 954 </body>
956 </html> 955 </html>
OLDNEW
« 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