From 3ed5106920801ca2aff3f655fd40e346e56c6c8f Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Tue, 29 Nov 2011 19:15:54 +0000 Subject: [PATCH] SOLR-2819: Improved speed of parsing hex entities in HTMLStripCharFilter git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1208032 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/analysis/charfilter/HTMLStripCharFilter.java | 4 ++-- solr/CHANGES.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java index ff3f20fb8a1..188d4e03fb5 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java @@ -124,8 +124,8 @@ public class HTMLStripCharFilter extends BaseCharFilter { private boolean isHex(int ch) { return (ch>='0' && ch<='9') || - (ch>='A' && ch<='Z') || - (ch>='a' && ch<='z'); + (ch>='A' && ch<='F') || + (ch>='a' && ch<='f'); } private boolean isAlpha(int ch) { diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index b54c486c844..497b46eb946 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -402,6 +402,9 @@ Bug Fixes ---------------------- * SOLR-2912: Fixed File descriptor leak in ShowFileRequestHandler (Michael Ryan, shalin) +* SOLR-2819: Improved speed of parsing hex entities in HTMLStripCharFilter + (Bernhard Berger, hossman) + ================== 3.5.0 ================== New Features