Commons Lang
  1. Commons Lang
  2. LANG-150

[lang] StringEscapeUtils.unescapeHtml skips first entity after standalone ampersand

    Details

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

      Operating System: All
      Platform: PC

      Description

      StringEscapeUtils.unescapeHtml skips the first entity after a standalone ampersand.

      Code:
      System.out.println(
      StringEscapeUtils.unescapeHtml("test & ä ö")
      );

      Output:
      test & ä ö

      Expected output:
      test & ä ö

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Duy Dao
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development