Use JavaScript String Escaper / Unescaper without a complicated workflow.
Escape text for JavaScript strings and unescape JavaScript-style escaped text. This registration is prepared for a browser-side JavaScript UI, so no Python/API processing is required when the UI is implemented.