Skip to content

Commit

Permalink
fix for bug in html scraper that appears if opening and closing tag a…
Browse files Browse the repository at this point in the history
…re not both in same case

see http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1173&p=7836#p7836

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4844 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed May 24, 2008
1 parent d8277e6 commit f8b0159
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/de/anomic/htmlFilter/htmlFilterContentScraper.java
Expand Up @@ -72,6 +72,7 @@ public class htmlFilterContentScraper extends htmlFilterAbstractScraper implemen
private static final HashSet<String> linkTags0 = new HashSet<String>(9,0.99f);
private static final HashSet<String> linkTags1 = new HashSet<String>(7,0.99f);

// all these tags must be given in lowercase, because the tags from the files are compared in lowercase
static {
linkTags0.add("img");
linkTags0.add("base");
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/htmlFilter/htmlFilterWriter.java
Expand Up @@ -231,7 +231,7 @@ private char[] filterTag(String tag, boolean opening, char[] content, char quote
}

// it's a tag! which one?
if ((opening) || (!(tag.equals(filterTag)))) {
if ((opening) || (!(tag.equalsIgnoreCase(filterTag)))) {
// this tag is not our concern. just add it
filterCont.append(genTag0raw(tag, opening, content));
return new char[0];
Expand Down

0 comments on commit f8b0159

Please sign in to comment.