Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5242

Disable escaping of html tag attributes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 6.7.0
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:

      Description

      Currently, all component tag attributes are escaped.With html5 data- attributes, much more values can be considered valid depending on the tag attribute and some should not be escaped.

      For example, bootstrap tooltips use the "data-title" attribute to set the content of a tooltip. Using Wicket's tag attributes, it's not possible to set the value "<b>hello world</b>" as the data-title since it is escaped.

      ComponentTag#writeOutput() is the method which calls Strings.escapeMarkup(value); and escapes tag values. This is called by Component#renderComponentTag().

      There should be a way to disable component tag escaping either per-tag or per-component.

      Reference email thread:
      http://apache-wicket.1842946.n4.nabble.com/AttributeModifier-with-html-in-the-attribute-tp4659206.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                berniegp Bertrand Guay-Paquet
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: