Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-429

Little improvement for SimpleHTMLEncoder

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • modules/examples
    • None
    • Operating System: other
      Platform: Other

    • 36333

    Description

      The SimpleHTMLEncoder could be improved slightly: all characters with code >=
      128 should be encoded as character entities. The reason is, that the encoder
      does not know the encoding that is used for the response. Therefore it is safer
      to encode all characters beyond ASCII as character entities.

      Here is the necessary modification of SimpleHTMLEncoder:

      default:
      if (c < 128)

      { result.append(c); }

      else

      { result.append("&#").append((int)c).append(";"); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            stefan.wachter@gmx.de Stefan Wachter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: