- From: Kornel Lesinski <kornel@geekhood.net>
- Date: Thu, 24 Jun 2010 16:04:22 +0100
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: <a href="foo> -- regards, Kornel
Received on Thursday, 24 June 2010 08:04:22 UTC