Commons Lang
  1. Commons Lang
  2. LANG-122

[lang] EscapeUtil.escapeHtml() should clarify that it does not escape ' chars to '

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      The official HTML character entity spec does not include the popular "'"
      entity name for the single quote character '. the StringUtils class correctly
      follows this behavior, leaving single quotes alone. However, many developers
      incorrectly assume that ' will get escaped into ' (I was one!) and we can
      help them by clarifying this in the Javadoc.

      The following could be appended to the method Javadoc:

      Note: Not all common HTML entity names are formally included in the standard
      specification (http://www.w3.org/TR/REC-html40/sgml/entities.html, as listed
      below). This method follows the standard, and thus does not escape the
      single-quote ' character into &apos.

        Activity

        Mark Thomas made changes -
        Workflow jira [ 12371589 ] Default workflow, editable Closed status [ 12602187 ]
        Sebb made changes -
        Description The official HTML character entity spec does not include the popular "'"
        entity name for the single quote character '. the StringUtils class correctly
        follows this behavior, leaving single quotes alone. However, many developers
        incorrectly assume that ' will get escaped into ' (I was one!) and we can
        help them by clarifying this in the Javadoc.

        The following could be appended to the method Javadoc:

        Note: Not all common HTML entity names are formally included in the standard
        specification (http://www.w3.org/TR/REC-html40/sgml/entities.html, as listed
        below). This method follows the standard, and thus does not escape the
        single-quote ' character into &apos.
        The official HTML character entity spec does not include the popular "'"
        entity name for the single quote character '. the StringUtils class correctly
        follows this behavior, leaving single quotes alone. However, many developers
        incorrectly assume that ' will get escaped into ' (I was one!) and we can
        help them by clarifying this in the Javadoc.

        The following could be appended to the method Javadoc:

        Note: Not all common HTML entity names are formally included in the standard
        specification (http://www.w3.org/TR/REC-html40/sgml/entities.html, as listed
        below). This method follows the standard, and thus does not escape the
        single-quote ' character into &apos.
        Sebb made changes -
        Description The official HTML character entity spec does not include the popular "'"
        entity name for the single quote character '. the StringUtils class correctly
        follows this behavior, leaving single quotes alone. However, many developers
        incorrectly assume that ' will get escaped into ' (I was one!) and we can
        help them by clarifying this in the Javadoc.

        The following could be appended to the method Javadoc:

        Note: Not all common HTML entity names are formally included in the standard
        specification (http://www.w3.org/TR/REC-html40/sgml/entities.html, as listed
        below). This method follows the standard, and thus does not escape the
        single-quote ' character into &apos.
        The official HTML character entity spec does not include the popular "'"
        entity name for the single quote character '. the StringUtils class correctly
        follows this behavior, leaving single quotes alone. However, many developers
        incorrectly assume that ' will get escaped into ' (I was one!) and we can
        help them by clarifying this in the Javadoc.

        The following could be appended to the method Javadoc:

        Note: Not all common HTML entity names are formally included in the standard
        specification (http://www.w3.org/TR/REC-html40/sgml/entities.html, as listed
        below). This method follows the standard, and thus does not escape the
        single-quote ' character into &apos.
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Fix Version/s 2.2 [ 12311702 ]
        Henri Yandell made changes -
        Affects Version/s 2.1 Final [ 12311701 ]
        Henri Yandell made changes -
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s 2.1 Final [ 12311659 ]
        Key COM-2532 LANG-122
        Project Commons [ 12310458 ] Commons Lang [ 12310481 ]
        Fix Version/s 2.2 [ 12311686 ]
        Component/s Lang [ 12311121 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 37385 12342684
        Dov Wasserman created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Dov Wasserman
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development