Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 232661 Details for
Bug 375452
Should escape regexp when populating 'Find' field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
fix
file_375452.txt (text/plain), 2.15 KB, created by
Silenio Quarti
on 2013-06-21 13:36:04 EDT
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Silenio Quarti
Created:
2013-06-21 13:36:04 EDT
Size:
2.15 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/regex.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/regex.js >index c47c5bd..eac976c 100644 >--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/regex.js >+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/regex.js >@@ -16,7 +16,7 @@ > * @class Utilities for dealing with regular expressions. > * @description Utilities for dealing with regular expressions. > */ >-define("orion/editor/regex", [], function() { >+define("orion/editor/regex", [], function() { //$NON-NLS-0$ > /** > * @methodOf orion.editor.regex > * @static >@@ -25,7 +25,7 @@ > * @returns {String} A copy of <code>str</code> with regex special characters escaped. > */ > function escape(str) { >- return str.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g, "\\$&"); >+ return str.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g, "\\$&"); //$NON-NLS-0$ > } > > /** >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js b/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js >index a110685..9fab722 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js >@@ -13,8 +13,8 @@ > /*global define window document navigator*/ > /*jslint sub:true*/ > >-define(['i18n!orion/search/nls/messages', 'orion/editor/find', 'orion/commands', 'orion/objects', 'orion/webui/littlelib' ], >- function(messages, mFind, mCommands, objects, lib){ >+define(['i18n!orion/search/nls/messages', 'orion/editor/find', 'orion/commands', 'orion/objects', 'orion/editor/regex', 'orion/webui/littlelib' ], >+ function(messages, mFind, mCommands, objects, regex, lib){ > > function TextSearcher(editor, cmdservice, undoStack, options) { > mFind.Find.call(this, editor, undoStack, options); >@@ -55,6 +55,9 @@ > findDiv = document.getElementById("localSearchFindWith"); //$NON-NLS-0$ > } > if (findString) { >+ if (this._regex) { >+ findString = regex.escape(findString); >+ } > findDiv.value = findString; > } > if (replaceString) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 375452
: 232661