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

MetaDataHeaderItem # generateString() should return specials characters escaped like StringEscapeUtils.escapeHtml(s) does

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 7.3.0, 6.23.0
    • 8.0.0-M1, 7.4.0, 6.24.0
    • wicket
    • None

    Description

      I think MetaDataHeaderItem # generateString() should return specials characters escaped like
      StringEscapeUtils.escapeHtml(s) does.

      Apache Wicket 7.3.0 - MetaDataHeaderItem - Line 126 : append(JavaScriptUtils.escapeQuotes(value.toString()))
      return qwerty'qwerty as qwerty\’qwerty

      I would like the return to be qwerty'qwerty (for example for the metatag description).

      Martin's answer :

      Looking at
      https://github.com/apache/wicket/blob/39fb20b112e2005dab8e17667e5a763b1d89f18e/wicket-core/src/main/java/org/apache/wicket/markup/head/MetaDataHeaderItem.java#L125-L127
      I agree that only double quotes should be escaped because only double
      quotes may end prematurely the value.

      Attachments

        Activity

          People

            bitstorm Andrea Del Bene
            francois Francois
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: