[wp-trac] [WordPress Trac] #59329: Firefox gets "ReferenceError: Â is not defined" in unminified moxie.js
WordPress Trac
noreply at wordpress.org
Tue Sep 12 13:04:50 UTC 2023
#59329: Firefox gets "ReferenceError: Â is not defined" in unminified moxie.js
--------------------------+-----------------------------
Reporter: kinggmobb | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: trunk
Severity: minor | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
In unminified moxie.js, there exists some weird Unicode characters on line
7391, between the BinaryReader constructor fn and the call to
Basic.extend(). In a hex editor, you can see the character bytes are
"C2A0", which is a random Korean Hangul character in Unicode.
In Firefox (as of the latest 117), when using Divi, this causes an
exception when loading unminified moxie.js. Firefox's Js loader interprets
the first byte alone as Â, and fails while loading moxie.js.
I can replicate this in FF+Divi, but the problem does not appear in
Chrome, Safari, or in FF when using other builders like
Classic/Gutenberg/Elementor/Beaver. Minification strips out the problem
bytes.
This link, https://stackoverflow.com/a/1462039/1201409, suggests the error
is leftover from an earlier era of encoding a nonbreaking space before
UTF-8 replaced other encodings.
Regardless of how the bytes got in there (and whether FF/Divi have bugs),
they shouldn't be there, and luckily, the fix is trivial: delete them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59329>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list