Title: Unicode gets unescaped · Issue #345 · javascript-obfuscator/javascript-obfuscator · GitHub
Open Graph Title: Unicode gets unescaped · Issue #345 · javascript-obfuscator/javascript-obfuscator
X Title: Unicode gets unescaped · Issue #345 · javascript-obfuscator/javascript-obfuscator
Description: The obfuscator seems to unescape escaped unicode in strings. For example, consider the following input javascript: console.log("\ud83d\ude03"); console.log("😃"); Expected Behavior I expect the unicode escape sequences to be preserved. So...
Open Graph Description: The obfuscator seems to unescape escaped unicode in strings. For example, consider the following input javascript: console.log("\ud83d\ude03"); console.log("😃"); Expected Behavior I expect the unic...
X Description: The obfuscator seems to unescape escaped unicode in strings. For example, consider the following input javascript: console.log("\ud83d\ude03"); console.log("😃"); Expected Behavi...
Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/345
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unicode gets unescaped","articleBody":"\u003c!-- Love javascript-obfuscator? Please consider supporting our collective:\r\n👉 https://opencollective.com/javascript-obfuscator/donate --\u003e\r\n\r\n\u003c!--- Provide a general summary of the issue in the Title above --\u003e\r\n\r\nThe obfuscator seems to unescape escaped unicode in strings. For example, consider the following input javascript:\r\n\r\n```\r\nconsole.log(\"\\ud83d\\ude03\");\r\nconsole.log(\"😃\");\r\n```\r\n\r\n## Expected Behavior\r\n\u003c!--- If you're describing a bug, tell us what should happen --\u003e\r\n\u003c!--- If you're suggesting a change/improvement, tell us how it should work --\u003e\r\n\r\nI expect the unicode escape sequences to be preserved. Something like this is expected:\r\n\r\n```\r\nconsole['log']('\\ud83d\\ude03');console['log']('😃');\r\n```\r\n\r\n## Current Behavior\r\n\u003c!--- If describing a bug, tell us what happens instead of the expected behavior --\u003e\r\n\u003c!--- If suggesting a change/improvement, explain the difference from current behavior --\u003e\r\n\r\nEscaped characters are unescaped. For the code above, the default obfuscation options produce: \r\n\r\n```\r\nconsole['log']('😃');console['log']('😃');\r\n```\r\n\r\nNotice the smiley faces appear as unicode characters, that is, they are no longer escaped. Note that if the \"Escape Unicode Sequence\" option is enabled then that does not happen and instead we get:\r\n\r\n```\r\nconsole['\\x6c\\x6f\\x67']('\\ud83d\\ude03');console['\\x6c\\x6f\\x67']('\\ud83d\\ude03');\r\n```\r\n\r\nHowever, from my understanding and documentation, this option is not about unescaping unicode, it is about escaping unicode (or escaping everything in general).\r\n\r\n## Steps to Reproduce (for bugs)\r\nObfuscate the above code using default configuration on https://obfuscator.io/ .\r\n\r\n## Your Environment\r\n\u003c!--- Include as many relevant details about the environment you experienced the bug in --\u003e\r\nUsed https://obfuscator.io/ .","author":{"url":"https://github.com/piotrm0","@type":"Person","name":"piotrm0"},"datePublished":"2018-10-25T00:15:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/345/javascript-obfuscator/issues/345"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:11f1e26e-338d-d7d8-778e-1ab3e10ce40b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82AA:2CC2E1:108C397:16AF105:6A62DD13 |
| html-safe-nonce | 92e92f28982c425ef5ad2cb23ed24ec603b2f2b3f4ab0026aac0ee60406aebaa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkFBOjJDQzJFMToxMDhDMzk3OjE2QUYxMDU6NkE2MkREMTMiLCJ2aXNpdG9yX2lkIjoiNzM3Nzk3NzY1MTI5Nzk2NzM3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dec7e3ea7d88b11f7e0b8b75519711504c8b0bd8a1731d2f0fedf1c92507467d |
| hovercard-subject-tag | issue:373724739 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-obfuscator/javascript-obfuscator/345/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5c52b5dd653ced7ae9b948f9fa0b92a7399d43d0734e7f7517ef5c7c6678165/javascript-obfuscator/javascript-obfuscator/issues/345 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5c52b5dd653ced7ae9b948f9fa0b92a7399d43d0734e7f7517ef5c7c6678165/javascript-obfuscator/javascript-obfuscator/issues/345 |
| og:image:alt | The obfuscator seems to unescape escaped unicode in strings. For example, consider the following input javascript: console.log("\ud83d\ude03"); console.log("😃"); Expected Behavior I expect the unic... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | piotrm0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/javascript-obfuscator/javascript-obfuscator git https://github.com/javascript-obfuscator/javascript-obfuscator.git |
| octolytics-dimension-user_id | 23015672 |
| octolytics-dimension-user_login | javascript-obfuscator |
| octolytics-dimension-repository_id | 58360147 |
| octolytics-dimension-repository_nwo | javascript-obfuscator/javascript-obfuscator |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 58360147 |
| octolytics-dimension-repository_network_root_nwo | javascript-obfuscator/javascript-obfuscator |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width