Uploaded image for project: 'Click'
  1. Click
  2. CLK-31

Escaping Quote Characters in Components' toString

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      All

      Description

      First off, thanks for Click. It's great!

      I've run into some minor trouble with attribute, name, id, and field values that contain single-quote (') characters. Since the toString wraps attribute values in single-quotes, attribute values containing single-quotes cause invalid HTML to be emitted in the resulting webpages.

      As an expedient to get past my problem at hand, I modified the toString method of TextField to perform a replaceAll("'", "'")) on the getValue call. (Just in case JIRA chokes on the replacement string, it is ampersand-octothorpe-3-9-semicolon.) String.replaceAll is not available in Java 1.3 and earlier, but I don't think this is a problem for Click since the "Building" page specs "1.4 or later".

      Please consider making this change for the HTML-emitting toString methods.

      Thank you,

      Mike Organek

        Attachments

          Activity

            People

            • Assignee:
              medgar Malcolm Edgar
              Reporter:
              morganek Mike Organek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: