[
https://issues.apache.org/jira/browse/WICKET-2650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795266#action_12795266
]
Maarten Billemont commented on WICKET-2650:
-------------------------------------------
Hmm; I hadn't seen OpenCloseTagExpander yet. Interesting approach; but appears
to be lacking a few tags.
Perhaps we should just add all HTML elements which are designed to have a body
to it, such as:
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-6, pre, title
For these elements, there is no advantage whatsoever to keeping them open/close
rather than open/body/close, while there is advantage to converting them to
open/body/close. In that light I don't see why we should not do this.
Currently, OpenCloseTagExpander seems like a nice but very incomplete filter.
The approach it takes is one to change a set of tags, but there is no logic or
consistency behind what tags are in the set.
> Consistently create body for short tags.
> ----------------------------------------
>
> Key: WICKET-2650
> URL: https://issues.apache.org/jira/browse/WICKET-2650
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.0
> Reporter: Maarten Billemont
>
> When the Wicket HTML contains a tag such as <a wicket:id="foo" /> and the
> component bound to that tag uses replaceComponentTagBody to write a string to
> the tag's body, currently nothing happens.
> Either a text node should be added to the component tag and the body written
> to it;
> Or a warning/exception should occur if for some reason it is preferred to not
> let this method succeed when the component tag has no body yet.
> I don't see the use of the latter, so I recommend the former be implemented.
> For now it's just confusing and dangerous. If I give my HTML to a web
> designed and he changes a few empty HTML tags to short tags, I'll never be
> warned, but my output WILL be broken.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.