Ticket #1485101 (closed Bugs: invalid)

Opened 7 months ago

Last modified 7 months ago

DomDocument Function has problems with malformed HTML

Reported by: brian Owned by:
Priority: 5 Milestone: later
Component: Client Scripts Version: svn-trunk
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

Changed 7 months ago by thomasb

  • status changed from new to closed
  • resolution set to invalid

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.