Title: URI malformed with Base64 string-array encoding and surrogate-range literal · Issue #1431 · javascript-obfuscator/javascript-obfuscator · GitHub
Open Graph Title: URI malformed with Base64 string-array encoding and surrogate-range literal · Issue #1431 · javascript-obfuscator/javascript-obfuscator
X Title: URI malformed with Base64 string-array encoding and surrogate-range literal · Issue #1431 · javascript-obfuscator/javascript-obfuscator
Description: Expected Behavior Obfuscation completes for valid JavaScript that contains a string literal with surrogate code units used in a regex range. Current Behavior Base64 string-array encoding throws URIError: URI malformed. This reproduces in...
Open Graph Description: Expected Behavior Obfuscation completes for valid JavaScript that contains a string literal with surrogate code units used in a regex range. Current Behavior Base64 string-array encoding throws URI...
X Description: Expected Behavior Obfuscation completes for valid JavaScript that contains a string literal with surrogate code units used in a regex range. Current Behavior Base64 string-array encoding throws URI...
Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1431
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"URI malformed with Base64 string-array encoding and surrogate-range literal","articleBody":"## Expected Behavior\nObfuscation completes for valid JavaScript that contains a string literal with surrogate code units used in a regex range.\n\n## Current Behavior\nBase64 string-array encoding throws `URIError: URI malformed`. This reproduces in v5.4.1 and appears related to the previously fixed [#530](https://github.com/javascript-obfuscator/javascript-obfuscator/issues/530).\n\n## Steps to Reproduce\n1. Install `javascript-obfuscator@5.4.1`.\n2. Run the minimal example below.\n\n## JavaScript Obfuscator Edition\n- JavaScript Obfuscator Open Source\n\n## Your Environment\n* Obfuscator version used: 5.4.1\n* Node version used: v23.7.0\n\n# Stack trace\n```\nURIError: URI malformed\n at encodeURIComponent (\u003canonymous\u003e)\n```\n\n## Minimal working example that will help to reproduce issue\n```js\nconst JavaScriptObfuscator = require(\"javascript-obfuscator\");\n\nJavaScriptObfuscator.obfuscate(\n String.raw`const controlSymbolRegexString = \"\\\\\\\\[^\\uD800-\\uDFFF]\";`,\n {\n stringArray: true,\n stringArrayEncoding: [\"base64\"],\n stringArrayThreshold: 1,\n splitStrings: true,\n splitStringsChunkLength: 5,\n seed: 1,\n },\n);\n```","author":{"url":"https://github.com/JasonHZS","@type":"Person","name":"JasonHZS"},"datePublished":"2026-07-10T06:16:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1431/javascript-obfuscator/issues/1431"}
| 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:8564829d-820c-9a44-d9bc-e0628b01a051 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D050:112899:3224D24:337AC44:6A632720 |
| html-safe-nonce | 7c1b2f603551d9a0067a3c61e1c5a1920ee6a7b3f7f87e684aede2c40aeeebb8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDUwOjExMjg5OTozMjI0RDI0OjMzN0FDNDQ6NkE2MzI3MjAiLCJ2aXNpdG9yX2lkIjoiODY3NDc2Njk1ODE1OTQwNjg4MCIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 68652d296f8573a22f7fab3379cfcffbac06fd8696cbd21209dd0319f71871ef |
| hovercard-subject-tag | issue:4852572667 |
| 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/1431/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3568d0e1320d32b86ce5d306fa7bba4ded9b53b0c35f4baa21f89f9d62a509e/javascript-obfuscator/javascript-obfuscator/issues/1431 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3568d0e1320d32b86ce5d306fa7bba4ded9b53b0c35f4baa21f89f9d62a509e/javascript-obfuscator/javascript-obfuscator/issues/1431 |
| og:image:alt | Expected Behavior Obfuscation completes for valid JavaScript that contains a string literal with surrogate code units used in a regex range. Current Behavior Base64 string-array encoding throws URI... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JasonHZS |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| 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 | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width