- Ported a missing Drupal 6.1 security fix.
parent
eafa931272
commit
a01deb1b1a
|
@ -51,7 +51,8 @@ Drupal.checkPlain = function(str) {
|
|||
str = String(str);
|
||||
var 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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue