Closed Bug 1417035 Opened 8 years ago Closed 8 years ago

Stop using <plaintext> in JSON Viewer

Categories

(DevTools :: JSON Viewer, enhancement)

enhancement
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(1 file)

Using a <plaintext> element to switch the tokenizer to plaintext state seemed a good idea for bug 1368899. However, - It's an obsolete element - It replaces U+0000 with U+FFFD (replacement character) - The current approach sends UTF-8 as is and converts UTF-16 into UTf-8. The latter automatically removes the BOM because the ignoreBOM parameter of TextDecoder is not supported (bug 1102679). Then the frontend removes the BOM again. Could be solved by checking the encoding, but doing different things depending on the encoding is getting messy. So it would be better to always use a TextDecoder to obtain the data, and then insert it manually instead of sending it as part of the stream.
Assignee: nobody → oriol-bugzilla
Blocks: 1417039
Status: NEW → ASSIGNED
Comment on attachment 8928145 [details] Bug 1417035 - Stop using <plaintext> in JSON Viewer https://reviewboard.mozilla.org/r/199388/#review205424 Looks reasonable, R+ assuming try is green. Honza
Attachment #8928145 - Flags: review?(odvarko) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/25f0af5e17cf Stop using <plaintext> in JSON Viewer r=Honza
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Depends on: 1418365
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: