Missing escape/unescape ?
See original GitHub issueTypeScript Version:
1.8 Code
var a = escape("&#");
var b = unescape(a);
Expected behavior: no error
Actual behavior: can not find name ‘escape’ can not find name ‘unescape’
by the way, typescript playground experience is terrible when use Microsoft Edge (input chinese charactors , click a new line , select code)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:14 (12 by maintainers)
Top Results From Across the Web
unescape() - JavaScript - MDN Web Docs
The unescape() function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent.
Read more >How to unescape escaped characters from the regex (.*?)
1. The string is ok. It just outputs it with the \f as some sort of hidden char. · String.raw maybe? – Konrad...
Read more >8. Escape/Unescape special XML characters - XMLStarlet
xml esc --help XMLStarlet Toolkit: Escape special XML characters Usage: xml ... more to be added in future) if <string> is missing stdin...
Read more >unescape() - JavaScript - UDN Web Docs: MDN Backup
The unescape() function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. The escape sequences ......
Read more >Slash-unescape a String
Load a string, unescape a string. ... It then removes the backslash, expands the escape sequence to its raw value and returns to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The global
escape
andunescape
are deprecated, please useencodeURI
instead. see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/escape.If you want to use them, just add the definitions:
@mhegazy @RyanCavanaugh
escape
/unescape
are useful exactly because they don’t support UTF-8.decodeURIComponent(escape(s))
andunescape(encodeURIComponent(s))
are, even if imperfect, very common and established “patterns” to decode / encode UTF-8 across all browsers including pretty ancient ones.