r58169 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58168‎ | r58169 | r58170 >
Date:22:41, 26 October 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added escaping of slashes in query string search
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SF_yui_autocompletion.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SF_yui_autocompletion.js
@@ -100,10 +100,11 @@
101101 var primaryResults = [];
102102 var secondaryResults = [];
103103 if (sQuery && sQuery.length > 0) {
104 - // in some cases, decodeURI() doesn't handle colons and dollar
105 - // signs correctly - replace them manually
 104+ // in some cases, decodeURI() doesn't handle certain characters
 105+ // correctly - replace them manually
106106 query_str = decodeURI(sQuery).replace(/(%3A)/g, ":").toLowerCase();
107107 query_str = query_str.replace(/(%24)/g, "$");
 108+ query_str = query_str.replace(/(%2f)/g, "/");
108109 for (var i = 0; i < values_list.length; i++) {
109110 subarray = values_list[i];
110111 // workaround for strange IE bug

Status & tagging log