diff --git a/source/net/yacy/search/snippet/TextSnippet.java b/source/net/yacy/search/snippet/TextSnippet.java index 9b516922b..163141a3e 100644 --- a/source/net/yacy/search/snippet/TextSnippet.java +++ b/source/net/yacy/search/snippet/TextSnippet.java @@ -343,6 +343,17 @@ public class TextSnippet implements Comparable, Comparator... tags are kept as is. + * + * @param urlhash hash of the url for this snippet + * @param line text to use as snippet + * @param isMarked true if query words already marked in input text + * @param errorCode + * @param errortext + */ private void init( final byte[] urlhash, final String line, @@ -350,7 +361,15 @@ public class TextSnippet implements Comparable, Comparator... html tags in place + this.line = CharacterCoding.unicode2html(line, false).replaceAll("<b>(.+?)</b>", "$1"); + } else { // otherwise encode all text for html display + this.line = CharacterCoding.unicode2html(line, false); + } + } else { + this.line = line; + } this.isMarked = isMarked; this.resultStatus = errorCode; this.error = errortext;