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

Double quotes aren't escaped properly in component tag attributes.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0-beta2
    • 1.3.0-beta3
    • None
    • None

    Description

      See http://www.nabble.com/Escaping-quotes-in-attributes-tf4044002.html#a11487305.

      Why is ComponentTag escaping quotes in attribute values with a backslash?
      For valid xhtml it should be an entity:

      Index: /home/sven/workspace/wicket/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java
      ===================================================================
      — /home/sven/workspace/wicket/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java (revision 554069)
      +++ /home/sven/workspace/wicket/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java (working copy)
      @@ -653,7 +653,7 @@
      if (value != null)

      { response.write("=\""); - value = Strings.replaceAll(value, "\"", "\\\""); + value = Strings.replaceAll(value, "\"", """); response.write(value); response.write("\""); }

      Should it not?

      Sven

      Attachments

        Activity

          People

            almaw Alastair Maw
            almaw Alastair Maw
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: