Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1175

single quote escapted to ' causes issues in ie8

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      ie8 browser

      Description

      Tapestry escapes single quotes in attribute values using ' which causes issues in ie8. the correct technique to avoid the ie8 issue is to use the hex number in the ascii reference.

      for example the content of the zone

      <t:zone ...>
      <a href="" onclick="alert('hi'); return false;">hi</a>
      </t:zone>

      will be encoded into the following string within the JSON in the XHR response:

      "<a href='' onclick='alert('hi'); return false;'>hi</a>"

      This will cause a syntax error in ie8.

      PATCH:

      Tapestry 5.1.0.5,
      org.apache.tapestry5.dom.AbstractMarkupModel
      line 136
      builder.append("'");
      change to
      builder.append("'");

        Attachments

          Activity

            People

            • Assignee:
              igor.drobiazko Igor Drobiazko
              Reporter:
              paul.stanton Paul Stanton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified