You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "mjustice3 (via GitHub)" <gi...@apache.org> on 2024/03/04 21:56:31 UTC

Re: [PR] LUCENE-10520 / #11556 HTMLStripCharFilter bugfix [lucene]

mjustice3 commented on PR #11724:
URL: https://github.com/apache/lucene/pull/11724#issuecomment-1977531543

   I believe I've found a regression with this bugfix. A test case that exposes:
   
   ```
     public void testForIssue10520Regression() throws IOException {
       String test =
           "<!DOCTYPE html><html lang=\"en\"><head><title>Test</title></head><a href=\"https://www.somewhere.com?data=\">a link</a> some text <a href=\"https://www.elsewhere.com\">another link</a></html>";
       Reader reader = new StringReader(test);
       HTMLStripCharFilter filter = new HTMLStripCharFilter(reader);
       StringWriter result = new StringWriter();
       filter.transferTo(result);
       assertEquals("Test\n\na link some text another link", result.toString().trim());
     }
   ```
   
   The problem is with the empty `data=` parameter at the end of the first url. We see a few of those in our document set and that is how I noticed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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