Closed PeterEPrice closed 9 years ago
That would be really odd. Are you sure? https://mothereff.in/js-escapes#1%25%25%25%25
I cannot reproduce this.
> jsesc('test%%test');
< 'test%%test'
I am performing the jsesc command from the terminal which makes me think it was the shell, not jsesc that is causing consecutive percent signs to turn into one percent sign. Sorry for questioning your program!
When jsesc operates on a string with two percent signs in a row ("%%") it will reduce the output to a single percent sing ("%").
Examples: jsesc test%%test -> test%test jsesc ♥%𝌆%%𝌆 -> \u2665%\uD834\uDF06%\uD834\uDF06 jsesc %%%test -> %%test jsesc test%%%% -> test%% jsesc %%%% -> %%