Skip to content

Commit 2b1bab5

Browse files
jQuery needs 2 \ to escape meta-chars so we need 4 (#38)
1 parent 35546f7 commit 2b1bab5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery.validate.unobtrusive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
function escapeAttributeValue(value) {
2626
// As mentioned on http://api.jquery.com/category/selectors/
27-
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
27+
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\\\$1");
2828
}
2929

3030
function getModelPrefix(fieldName) {

0 commit comments

Comments
 (0)