TSK-546 Extracted content Arabic files issue

fixes issue when content was escaped twice in some cases, if set node called multiple times on the same content (that should be looked at too)
This commit is contained in:
adam-m 2012-07-18 13:04:30 -04:00
parent b72faa5a00
commit 1fad291255

View File

@ -158,9 +158,9 @@ public class ExtractedContentViewer implements DataContentViewer {
@Override
public String getMarkup() {
try {
curContent = StringEscapeUtils.escapeHtml(getSolrContent(selectedNode, currentPage, hasChunks));
curContent = "<pre>" + curContent.trim() + "</pre>";
return curContent;
curContent = getSolrContent(selectedNode, currentPage, hasChunks);
String curContentTrimmed = "<pre>" + curContent.trim() + "</pre>";
return curContentTrimmed;
} catch (SolrServerException ex) {
logger.log(Level.WARNING, "Couldn't get extracted content.", ex);
return "";
@ -418,7 +418,10 @@ public class ExtractedContentViewer implements DataContentViewer {
//not cached
try {
curContent = solrServer.getSolrContent(contentObj, chunkId);
curContent = StringEscapeUtils.escapeHtml(solrServer.getSolrContent(contentObj, chunkId)).trim();
StringBuilder sb = new StringBuilder(curContent.length() + 20);
sb.append("<pre>").append(curContent).append("</pre>");
curContent = sb.toString();
curContentId = contentId;
curContentChunk = chunkId;
} catch (NoOpenCoreException ex) {