Ext.String.escape

For a string, for example:

Sencha string utility is "good"

Ext.String.escape converts it to the following:

Sencha \\ line utility \ "good \"

Why does he add a double backslash when apostrophe against a single backslash in an inverted comma.

In the end, when I displayed the line, it seemed like this:

Sencha \ string utility "good"

How to fix it?

+4
source share
1 answer

You can try the following:

Ext.String.escape('Sencha\ string utility is "good"').replace(/\\/,''); // Output: Sencha string utility is "good" 
+1
source

All Articles