gh-149144: Use decodeURIComponent() for UTF-8 support in js_output()#149157
Conversation
|
Thanks @sethmlarson for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
Sorry, @sethmlarson and @encukou, I could not cleanly backport this to |
|
GH-149846 is a backport of this pull request to the 3.15 branch. |
|
Sorry, @sethmlarson and @encukou, I could not cleanly backport this to |
|
|
GH-149849 is a backport of this pull request to the 3.14 branch. |
|
Related to #90309. Fixes a bug in the security fix #148848
The JavaScript function
atob()only outputs strings inlatin-1, not inutf-8.decodeURIComponentoutputs to UTF-8. Tested in Firefox and Chrome and the functiondecodeURIComponentis supported by IE 5.5+.Python:
JavaScript (Firefox, Chrome):