Opened 5 years ago

Closed 5 years ago

#1485101 closed Bugs (invalid)

DomDocument Function has problems with malformed HTML

Reported by: brian Owned by:
Priority: 5 Milestone: later
Component: Client Scripts Version: git-master
Severity: normal Keywords:
Cc:

Description

The new DomDocument? loadHtml function has problems with malformed HTML (eg. HTML, HEAD, and BODY tags inside another set of HTML>BODY tags). I don't think it is viable to handle all malformed HTML emails (there will always be something it cannot handle).

I propose an option to allow switching between plain text and HTML formats (only visible when the email contains HTML). While I can go into the source to view the content, this is not user friendly, and not something I would recommend to a non technical user. A radio button similar to the one in the Compose screen (when TinyMCE is enabled) would be ideal.

Change History (1)

comment:1 Changed 5 years ago by thomasb

  • Resolution set to invalid
  • Status changed from new to closed

The fact the DomDocument? fails on invalid HTML is desirable because these things can be used to confuse some browsers and cause security leaks.

There's an option on the user prefs called "Display HTML". If you disable this, messages are displayed as plain text and the HTML message part appears as an attachment.

Note: See TracTickets for help on using tickets.