Open Bug 1401793 Opened 5 years ago Updated 3 years ago

XML pretty print viewer is too easily disabled by extensions


(Core :: XML, defect, P5)






(Reporter: mkaply, Unassigned)



If you have this extension installed:

When you navigate to an XML file, it comes up blank instead of displaying the XML tree view. For instance:

I don't see any obvious errors on the console.
Component: WebExtensions: General → Add-ons
Product: Toolkit → Tech Evangelism
The developer has been contacted via AMO.
See Also: → 1404266
Duplicate of this bug: 1404933
Duplicate of this bug: 1404266
This bug and its duplicates have bounced between different components from XML to WebExtensions to Tech Evangelism but I think it is very much an XML issue. Extension content scripts are injected into XML pages by design and ideally extension authors would be more mindful of that but a lot of them will fail to test there so ultimately it falls back on the XML pretty printer to be more robust.

Chrome's XML pretty printer is harder to disable than Firefox's, for example changing the style of elements via class attribute does not disable it while Firefox does.

A similar story can be seen in Bug 1404933 Comment #0:
> This bug[1] affects the Vimium-ff[2] extension, since we have to inject HTML
> into the active document to show our UI. Note that this works as expected in
> Chrome.

Improving the compatibility of pretty print would go a long way to avoiding most issues with extensions. 

Also interesting to note that Firefox's Inspector only shows the root element while Chrome shows the full pretty print HTML source.
Component: Add-ons → XML
Product: Tech Evangelism → Core
Summary: MetaCert extension breaks the display of XML files → XML pretty print viewer is too easily disabled by extensions
Priority: -- → P5
Duplicate of this bug: 1455021
Duplicate of this bug: 1462667
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1437956
May I know why this is dup'd to bug 1437956? We simply change the technology to put the pretty print DOM; we will still opt out of it when DOM changes.
Flags: needinfo?(kmaglione+bmo)
Reopening because this bug is not fixed yet and :kmag didn't respond.
Resolution: DUPLICATE → ---
Flags: needinfo?(kmaglione+bmo)
See Also: → 1605657

I think this is fixed with bug 1605657. Or at least it is fixed for LastPass. FF 74.0b4 works fine with LastPass enabled.

Example URL that didn't work in 73 and works in 74:

Flags: needinfo?(mozilla)

I just tried with the latest nightly and this bug can still be recreated. Install the above extension and navigate to the XML and it is blank.

Flags: needinfo?(mozilla)
You need to log in before you can comment on or make changes to this bug.