summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-03 08:21:43 +0000
committeralecpl <alec@alec.pl>2010-06-03 08:21:43 +0000
commit9dd3553ab00be27d2dfcc3e3a90275e8dbb3cb2e (patch)
treeccd46c106722940a0137d9a6273b86fd4f18f33c
parent058eb6cd7002e066d037063d60f0a3ad27fe67c7 (diff)
- Fix autocomplete results are wrongly displayed when search string contains e.g. a dot character
-rw-r--r--program/js/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index fc9ef77e0..370bdd4c3 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3476,7 +3476,7 @@ function rcube_webmail()
for (i=0; i < a_results.length; i++) {
text = typeof a_results[i] == 'object' ? a_results[i].name : a_results[i];
li = document.createElement('LI');
- li.innerHTML = text.replace(new RegExp('('+s_val+')', 'ig'), '##$1%%').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/##([^%]+)%%/g, '<b>$1</b>');
+ li.innerHTML = text.replace(new RegExp('('+RegExp.escape(s_val)+')', 'ig'), '##$1%%').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/##([^%]+)%%/g, '<b>$1</b>');
li.onmouseover = function(){ ref.ksearch_select(this); };
li.onmouseup = function(){ ref.ksearch_click(this) };
li._rcm_id = i;