[ 
https://issues.apache.org/jira/browse/LUCENE-3690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185831#comment-13185831
 ] 

Steven Rowe commented on LUCENE-3690:
-------------------------------------

bq. I had a heck of a time handling all the weird stuff that could appear 
inside script tags, for example, and I don't think I see much of a test for 
that (again... my fault.)

I added tests with the following snippets:

{noformat}
one<script><!-- <!--#config comment="<!-- \"comment\"-->"--> --></script>two

=> 'one
two'
{noformat}
{noformat}
one<script attr= bare><!-- action('<!-- comment -->', "\"-->\""); 
--></script>two

=> 'one
two'
{noformat}
{noformat}
hello<script><!-- f('<!--internal--></script>'); --></script>

=> 'hello
'
{noformat}

bq. One can be sure that the current implementation doesn't always do the right 
thing, but unfortunately "right" isn't well defined here considering the domain.

I agree - the "right" thing IMHO is: get as much content from as varied a range 
of sources as possible, and never ever allow the input to bork processing.

bq. The cost to keeping around the current version for a little while seems 
minimal.

My proposal would do this, though under a different name, and requiring a 
luceneMatchVersion of 3.5 or earlier for the factory to use it.  Do you object 
to this?  

I have two issues with not switching over now:

# It's a chicken and egg problem: how will people know if there is a problem 
with the new implementation if they don't use it?
# The current version has several long standing bugs that nobody has fixed.  I 
personally wouldn't attempt it with the current implementation: it's difficult 
to understand.  This is one of my main motivations for making this new version: 
when people find issues, fixing them should be much easier with the new 
implementation.

                
> JFlex-based HTMLStripCharFilter replacement
> -------------------------------------------
>
>                 Key: LUCENE-3690
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3690
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: modules/analysis
>    Affects Versions: 3.5, 4.0
>            Reporter: Steven Rowe
>            Assignee: Steven Rowe
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3690.patch, LUCENE-3690.patch, LUCENE-3690.patch
>
>
> A JFlex-based HTMLStripCharFilter replacement would be more performant and 
> easier to understand and maintain.

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to