rule.value2regex does now unescape double escape. Patch by tcoulter. r=me (closes #1453)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@7866 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-08-26 18:03:41 +00:00
parent 0eadc40e27
commit 75b129191b
2 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -137,13 +137,14 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, {
return null;
}
// set UMN MapServer defaults for unspecified parameters
wildCard = wildCard ? wildCard : "*";
singleChar = singleChar ? singleChar : ".";
escapeChar = escapeChar ? escapeChar : "!";
this.value = this.value.replace(
new RegExp("\\"+escapeChar, "g"), "\\");
new RegExp("\\"+escapeChar+"(.|$)", "g"), "\\$1")
this.value = this.value.replace(
new RegExp("\\"+singleChar, "g"), ".");
this.value = this.value.replace(