8

Is there a String Escaping/Unescaping (Javascript) Plugin for Notepad++?

When looking at Javascript code, quite often quoted strings are used similar to the notation used in JSON, e.g. when looking at the source code generated by Googletagmanager, the complete javascript or html code I entered as tag definition shows up as encoded Javascript string. To debug this, it is useful to be able to decode the string. I currently do this with a perl script. but it would be better to have a plugin function in Notepad++ to do this directly.

E.g. convert "\x3cscript\x3ealert(\x22hello\x22);\x3c/script\x3e" to <script>alert("hello");</script>

The same would make sense the other way as encoding as well.

Alex Lehmann
  • 668
  • 1
  • 6
  • 11

1 Answers1

6

Well, as of N++, I know only of solutions for URI unescaping, not JS unescaping. But from your question you seem you know scripting so maybe you can adjust script in this solution to unescape JS format instead of URI format. And it also opens you a way for other possible text transformations, if you think of some in future.

Community
  • 1
  • 1
miroxlav
  • 11,796
  • 5
  • 58
  • 99