Steps to reproduce:
1) Disable all add-ons in Firefox
2) Open an URL that points to a XML file
3) AS EXPECTED: A pretty-printed XML is shown
4) Enable the React DevTools Add-on
5) Open the XML file again
6) FAIL: Only the content inside the XML tags are shown
Using Firefox Developer Edition 72.0b6 on macOS 10.15.2
I am able to reproduce the behavior described using Firefox Developer Edition (72.0b1) but regular Firefox (71.0) does not exhibit the buggy behavior. I don't believe this is something that the React DevTools add-on should be able to cause, since syntax highlighting is a built-in browser feature.
There is no error in the console (or the add-on if I inspect it). Just enabling the extension is enough to immediately "break" pretty-print for XML files, e.g. https://www.w3schools.com/xml/note.xml
I believe that this may be a Firefox Developer Edition bug. It's probably not something that an extension should be able to cause. I'll open a bug on their end:
https://bugzilla.mozilla.org/show_bug.cgi?id=1605657
cc @jasonLaster
Thanks! I see the same with Redux DevTools and the LastPass add-on
It's unclear what Firefox is going to do on their end about this, but it seems like we can make this better by checking in the content script if document.contentType is "text/xml" before injecting any <script> tags.
This will be fixed in the next release.
FYI this issue should be fixed in v4.4 (released today)
Most helpful comment
FYI this issue should be fixed in v4.4 (released today)