From ce1d1b2fa03f90d29264ea0d573a71c945473f90 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Fri, 11 Apr 2014 09:56:44 +0200 Subject: [PATCH] fix for maximum tag length in parser --- source/net/yacy/document/parser/html/ContentScraper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/document/parser/html/ContentScraper.java b/source/net/yacy/document/parser/html/ContentScraper.java index 0b4770c6e..8f9833da4 100644 --- a/source/net/yacy/document/parser/html/ContentScraper.java +++ b/source/net/yacy/document/parser/html/ContentScraper.java @@ -66,6 +66,8 @@ import net.yacy.kelondro.util.ISO639; public class ContentScraper extends AbstractScraper implements Scraper { + + private final static int MAX_TAGSIZE = 1024 * 1024; public static final int MAX_DOCSIZE = 40 * 1024 * 1024; private final char degree = '\u00B0'; @@ -124,12 +126,12 @@ public class ContentScraper extends AbstractScraper implements Scraper { public Tag(final String name) { this.name = name; this.opts = new Properties(); - this.content = new CharBuffer(100); + this.content = new CharBuffer(MAX_TAGSIZE); } public Tag(final String name, final Properties opts) { this.name = name; this.opts = opts; - this.content = new CharBuffer(100); + this.content = new CharBuffer(MAX_TAGSIZE); } public Tag(final String name, final Properties opts, final CharBuffer content) { this.name = name;