Saving and reloading files in the style editor does not properly encode unicode characters
Categories
(DevTools :: Style Editor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: wodjv1d3n, Unassigned)
Details
Attachments
(1 file)
|
148.94 KB,
image/jpeg
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Steps to reproduce:
-
Open dev tools (F12) and navigate to the Style Editor tab
-
Click the + button to create and append a new stylesheet to the document
-
Paste some text with unicode characters, here is an example where I discovered this:
.hlist dd:after,
.hlist li:after {
content: " · ";
} -
ctrl+s to save the file (location does not matter as far as I can tell)
-
Press the button next to the + to import a stylesheet, and choose the sheet that was just saved. It should now read:
.hlist dd:after,
.hlist li:after {
content: " · ";
} -
Doing this repeatedly, such as when refreshing the page a lot after changes for testing, will compound the issue and turn that bullet into longer strings like ÃÂ÷
Actual results:
Unicode characters seem to be encoded incorrectly when saving, resulting in them being "corrupted" when re-loading. In addition to the bullet, I've also noticed this with “”. This does not seem to happen with ASCII characters.
Additional note, I first noticed this issue on May 30, 2024, but was only just now convinced I should report it.
Expected results:
Unicode characters should be unchanged when saving and reloading the file.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Style Editor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
Thanks for filing
Comment 3•1 year ago
|
||
Sounds like a duplicate from Bug 1836706
Description
•