lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernhard Berger (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-2819) Wrong isHex()-method in HTMLStripCharFilter
Date Mon, 10 Oct 2011 08:42:29 GMT
Wrong isHex()-method in HTMLStripCharFilter
-------------------------------------------

                 Key: SOLR-2819
                 URL: https://issues.apache.org/jira/browse/SOLR-2819
             Project: Solr
          Issue Type: Bug
    Affects Versions: 3.4
            Reporter: Bernhard Berger
            Priority: Trivial


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

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

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


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message