Hi All,
I would like to ask about two separate pieces of code in the Wicket
codebase working with HTML Ids:
1. org.apache.wicket.markup.repeater.AbstractRepeater
This class uses regex SAFE_CHILD_ID_PATTERN and produces warning in
case the repeater IDs are not just numerical. I found a post [1] where
Igor gave an explanation eons ago. I tried to locate code that would
rely on that fact but didn't find anything. Is it possible that the
check and warning produced are obsolete nowadays? If so, I guess it
could be removed (I'd happily provide pull request). Otherwise, would
someone point me to the code that relies on this?
2. org.apache.wicket.DefaultMarkupIdGenerator
This class, after generating an Id, goes on to "escape some
noncompliant characters" (namely "_.- ") with underscores. I'm not sure
what compliance it's referring to. I checked the HTML 4 spec [2] and
HTML 5 specs [3]. All mentioned characters except whitespace seem to be
legit in that context. Could someone shed some light on this -- e.g.
what purpose does it exactly serve?
Many thanks in advance.
Best regards,
Marek
[1]
http://apache-wicket.1842946.n4.nabble.com/Is-SAFE-CHILD-ID-PATTERN-in-AbstractRepeater-correct-or-does-it-break-CSS-spec-td1869301.html#a1869308
[2] http://www.w3.org/TR/html401/types.html#type-name
[3] http://www.w3.org/TR/html5/dom.html#the-id-attribute