On Fri, Dec 31, 2010 at 1:57 AM, Jeremy Thomerson <[email protected] > wrote:
> On Thu, Dec 30, 2010 at 5:02 PM, Juergen Donnerstag > <[email protected]> wrote: > > right. I didn't mean to apply to 1.4 but 1.5 only > > Actually, changing my opinion from -0 to -1 (even for 1.5). We only > do this on tags that need it now (Label, for example). I believe > that's the way it should be. > Actually we have this functionality already: org.apache.wicket.markup.parser.filter.OpenCloseTagExpander This markup filter transforms the following html elements: private static final List<String> replaceForTags = Arrays.asList("a", "q", "sub", "sup", "abbr", "acronym", "cite", "code", "del", "dfn", "em", "ins", "kbd", "samp", "var", "label", "textarea", "tr", "td", "th", "caption", "thead", "tbody", "tfoot", "dl", "dt", "dd", "li", "ol", "ul", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "title", "div" // tags from pre 1.5 days, shouldnt really be here but make this release more backwards // compatible , "span", "p", "strong", "b", "e", "select", "col"); I didn't notice when <span/> was added to the list but I had at least three "sessions" in IRC when someone complained why <div/> is auto-expanded by Wicket and <span/> is not. I remember when Matej added <div/> in the list and the reason for that - Firefox did wrong auto-close and broke the user application. I also think it is not Wicket job to fix user's code but the history shows that doing this for the elements above didn't hurt anyone so far. I have one suggestion - instead of using whitelist we can use blacklist for the elements we don't want to auto-expand: <meta/>, <input/>, <img/>, <br/>, ... > > -- > Jeremy Thomerson > http://wickettraining.com > Need a CMS for Wicket? Use Brix! http://brixcms.org >
