Ticket #9530 (closed bug: duplicate)
jQuery erroneously treats some a tags as self-closing
|Reported by:||contact@…||Owned by:|
Same exact input, different outputs.
What’s going on:
Sometimes you have code like:
For example, one HTML sanitizes stripped out the surrounding quotes on the attribute value and gave me that output.
If you do an .html(foo) where foo is the above, then jQuery parses this as
if it were <a href="http://example.com" />, self-closing, that is, <a href="http://example.com/..."></a>foo</a>
Thus the link is not actually clickable anymore; it's empty and then followed by a text node and an extra closing tag.
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to manipulation
- Status changed from closed to reopened
- Resolution invalid deleted
comment:16 Changed 23 months ago by rwaldron
- Status changed from open to closed
- Resolution set to duplicate