Skip to content
Snippets Groups Projects
Commit a01deb1b authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Ported a missing Drupal 6.1 security fix.

parent eafa9312
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -51,7 +51,8 @@ Drupal.checkPlain = function(str) { ...@@ -51,7 +51,8 @@ Drupal.checkPlain = function(str) {
str = String(str); str = String(str);
var replace = { '&': '&amp;', '"': '&quot;', '<': '&lt;', '>': '&gt;' }; var replace = { '&': '&amp;', '"': '&quot;', '<': '&lt;', '>': '&gt;' };
for (var character in replace) { for (var character in replace) {
str = str.replace(character, replace[character]); var regex = new RegExp(character, 'g');
str = str.replace(regex, replace[character]);
} }
return str; return str;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment