You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the new Font Library in WordPress 6.5, I ran into the following error:
register-service-worker.ts:64 Uncaught (in promise) SyntaxError: Bad escaped character in JSON at position 601 (line 9 column 122) (at comlink.js?v=01749073:42:27)
at JSON.parse (<anonymous>)
at #getResponseHeaders (base-php.ts:349:28)
at #handleRequest (base-php.ts:631:44)
at async WebPHP.run (base-php.ts:267:21)
at async #dispatchToPHP (php-request-handler.ts:243:11)
at async PHPRequestHandler.request (php-request-handler.ts:119:11)
at async PHPBrowser.request (php-browser.ts:61:20)
When using the new Font Library in WordPress 6.5, I ran into the following error:
Turns out, it was in this line in base-php.ts:
It tries to parse the JSON-encoded headers emited by PHP.wasm. Here's the output that tripped it up:
Turns out, it's about
\d
. We should probably escape backslashes like we escape double quotes: in thewasm_sapi_send_headers
C function:wordpress-playground/packages/php-wasm/compile/php/php_wasm.c
Lines 1423 to 1431 in 1467766
cc @bgrgicak – would you like to tackle this one?
The text was updated successfully, but these errors were encountered: