Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2819

Wrong isHex()-method in HTMLStripCharFilter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.4
    • 3.6, 4.0-ALPHA
    • None
    • None

    Description

      In org.apache.solr.analysis HTMLStripCharFilter use a wrong isHex()-method that return characters like 'X', 'Y' as valid hex chars:

        private boolean isHex(int ch) {
          return (ch>='0' && ch<='9') ||
                 (ch>='A' && ch<='Z') ||
                 (ch>='a' && ch<='z');
        }
      

      If only characters from [0-9a-zA-Z] are allowed, the readNumericEntity method will detect faster a mismatch.

      Attachments

        Activity

          People

            hossman Chris M. Hostetter
            sonson Bernhard Berger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: