Solr
  1. Solr
  2. SOLR-2819

Wrong isHex()-method in HTMLStripCharFilter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      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.

        Activity

          People

          • Assignee:
            Hoss Man
            Reporter:
            Bernhard Berger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development