mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Only addslashes for strings
This commit is contained in:
parent
4bf629dbd9
commit
5ed7071379
1 changed files with 1 additions and 0 deletions
|
@ -242,6 +242,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
var addSlashes = function (str) {
|
||||
if(!_.isString(str)) return str;
|
||||
str = str.replace(/\\/g, '\\\\');
|
||||
str = str.replace(/\'/g, '\\\'');
|
||||
str = str.replace(/\"/g, '\\"');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue