[whatwg] Allowing ">" in attribute values
kornel at geekhood.net
Thu Jun 24 08:04:22 PDT 2010
On 24 Jun 2010, at 14:11, Benjamin M. Schwartz wrote:
>> Why would it simplify parsing?
> It greatly simplifies parsing when you just want to extract entire tags,
> without immediately parsing the attributes.
If you mean "parsing" with regular expressions, then I think that's a bad practice and shouldn't be encouraged.
Also take into consideration that even if ">" was forbidden in the spec, it wouldn't mean it doesn't happen in the wild. Since it works in browsers, you'd still have to support it if you wanted to parse markup from the web. OTOH if you want to parse only markup that is under your control, you can self-impose that restriction.
However, I see other argument against allowing ">" in attributes: it helps to catch unclosed attributes early:
More information about the whatwg