From 6dff8a7d414714d5521b40748dd62e242f75ca38 Mon Sep 17 00:00:00 2001
From: Bananeweizen
"; private static Pattern STRIP_DATE = Pattern.compile("\\+0([0-9]){1}\\:00"); private static class CacheHolder { @@ -522,7 +524,7 @@ public class OC11XMLParser { @Override public void end(String logText) { - logHolder.logEntry.log = logText; + logHolder.logEntry.log = stripMarkup(logText); } }); @@ -534,4 +536,17 @@ public class OC11XMLParser { return null; } } + + /** + * removes unneeded markup + */ + protected static String stripMarkup(String input) { + if (StringUtils.startsWith(input, PARAGRAPH_BEGIN) && StringUtils.endsWith(input, PARAGRAPH_END)) { + String inner = input.substring(PARAGRAPH_BEGIN.length(), input.length() - PARAGRAPH_END.length()); + if (inner.indexOf(PARAGRAPH_BEGIN) < 0) { + return inner; + } + } + return input; + } } \ No newline at end of file -- cgit v1.1