Opened 13 years ago

Closed 13 years ago

#2225 enhancement closed fixed (fixed)

microdom shouldn't bork on malformed tags when beExtremelyLenient is enabled

Reported by: Jonathan Lange Owned by:
Priority: highest Milestone:
Component: web Keywords:
Cc: Branch:


When microdom encounters things like <div al!\n ign="center">, it should ignore the whole tag if beExtremelyLenient is enabled.

Justification: Firefox, Safari and IE all ignore malformed tags, and the purpose of beExtremelyLenient is to let us get a handle on bad HTML.

Change History (7)

comment:1 Changed 13 years ago by Jonathan Lange

Keywords: review added
Owner: changed from Jonathan Lange to Glyph
Priority: highhighest

Ready for review in microdom-bad-tags-2225

comment:2 Changed 13 years ago by Glyph

Status: newassigned

comment:3 Changed 13 years ago by Glyph

Component: webwords
Keywords: review removed
Owner: changed from Glyph to Jonathan Lange
Priority: highestlowest
Status: assignednew
Type: enhancementtask

I basically like this.

I'd rather not have whitespace mashing in files which aren't otherwise modified (I don't see any semantic changes in, and the tests pass if I revert it), but this has to happen some time, so now that I've gone to the trouble of looking at it let's go ahead and merge it.

The only problem I have is that I don't think the string "True" has any particular semantics in this case. In some cases, XHTML requires a string like "on" or "checked"; in others it accepts any value (including the empty string).

If "True" is random here, I'd suggest replacing it with the empty string, then merge. Otherwise go ahead and merge as-is.

comment:4 Changed 13 years ago by Glyph

Component: wordsweb
Priority: lowesthighest
Type: taskenhancement

Guh. Trac really freaked out Firefox somehow and messed up a bunch of attributes as part of that review. Puttin gthem back...

comment:5 Changed 13 years ago by Jonathan Lange

[16:32]  <jml> glyph: so, sux uses "True" as the default value for an attribute.
[16:33]  <jml> glyph: you want me to change that (totally untested) behaviour?
[16:33]  <glyph> jml: Nope
[16:33]  <glyph> jml: that's a good enough reason to leave as-is
[16:33]  <glyph> jml: perhaps we should revisit it later
[16:33]  <jml> sure

#2227 is the revisit-it-later ticket.

comment:6 Changed 13 years ago by Jonathan Lange

Resolution: fixed
Status: newclosed

(In [18633]) Make sux even more lenient when beExtremelyLenient is enabled.

  • Author: jml
  • Reviewer: glyph
  • Fixes #2225

Don't explode when we find weird characters and line breaks in HTML. Instead, muddle on as best we can. This behaviour inspired by the way Firefox handles really bad HTML.

comment:7 Changed 9 years ago by <automation>

Owner: Jonathan Lange deleted
Note: See TracTickets for help on using tickets.