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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-beta2
    • Fix Version/s: 1.3.0-beta3
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: