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

David Smiley commented on LUCENE-5740:
--------------------------------------

bq. It might be better to just track nested tags of the same type as the 
current tag being stripped, rather than all tags - the other contained tags 
should be ignorable, I think. (This condition - nested same-type tags - should 
be fairly rare, but will need to be handled, e.g. 
<ul><li><ul><li></li></ul></li></ul>.)

As I think about this, I like your earlier idea here, quoted above.  I'll do it 
this way.

bq. The other thing to worry about is the possible lack of closing tags for a 
tag the contents of which are to be stripped. I'm not sure how to handle this - 
maybe look at how other HTML parsers do it? (I.e., how to limit scope of 
never-closed tags.)

I think this feature makes no sense for tags that don't (necessarily) have 
closing tags (e.g. <p>).  The feature could at least have a statement that tags 
for this feature need to close themselves.

> Add stripContentOfTags option to HTMLStripCharFilter
> ----------------------------------------------------
>
>                 Key: LUCENE-5740
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5740
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>
> HTMLStripCharFilter should have an option to strip out the sub-content of 
> certain elements. It already does this for SCRIPT & STYLE but it should be 
> configurable to add more.  I don't want certain elements to have their 
> contents to be searchable.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to