diff --git a/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java b/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java index f3c0a6058..35f3fcd2b 100644 --- a/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java +++ b/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java @@ -280,8 +280,9 @@ public class StringUtil { s = s.replaceAll("^\\s+|\\s+$", ""); if (s.length() > 0) { if (s.toLowerCase().contains("]+)/?>", "
")); - } else { + s = s.replaceAll("(?i)]+)/?>", ""); + } + if (!(s.startsWith("").append(s).append("
"); } }