Supporting legacy <image>
Harri Porten
porten at froglogic.com
Sun Oct 5 14:56:45 BST 2008
Hi!
Some reworking of our tag name representation (r867535) broke support for
legacy HTML elements. The question is do which degree we want to fix or
drop that. The misc/maketags made the following elements equivalent
image -> img
anchor -> a
listing -> pre
for pre HTML 4 compat. I've put up a test on
http://www.froglogic.com/~porten/compat.html that tests both HTML parsing
and createElement() DOM calls for those three. Results:
- neither Firefox, IE nor Opera special case "anchor" and "listing". I
was not able to find any sign of <anchor> btw.
- Opera and IE map "image" onto "img" both in the parse and
createElement()
- Firefox does special-case "image" on createElement() only.
My suggestion would be to follow IE and Opera. Firefox is inconsistent. A
proposed patch is attached but I'm not fully sure it's correct and is
applied at the correct level. Maksim or Vyacheslav may be able to suggest
a simpler if (id == ID_IMAGE) id = ID_IMG; hack at 1-2 central places
only.
Harri.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: image.diff
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20081005/0ef01de1/attachment.ksh>
More information about the kfm-devel
mailing list