|
|
@ -60,12 +60,18 @@ public class ResourceUtil { |
|
|
|
private static String createHtml(String title, String txt) { |
|
|
|
private static String createHtml(String title, String txt) { |
|
|
|
StringBuilder body = new StringBuilder(); |
|
|
|
StringBuilder body = new StringBuilder(); |
|
|
|
for (String s : txt.split("\\r?\\n")) { |
|
|
|
for (String s : txt.split("\\r?\\n")) { |
|
|
|
s = s.trim(); |
|
|
|
s=StringUtil.FixTrim(s); |
|
|
|
if (s.length() != 0) { |
|
|
|
if (s.length() != 0) { |
|
|
|
|
|
|
|
if(s.contains("<img")){ |
|
|
|
|
|
|
|
//body.append("<div class=\"duokan-image-single img-note\">")
|
|
|
|
|
|
|
|
body.append(s);//.append("</div>");
|
|
|
|
|
|
|
|
}else { |
|
|
|
body.append("<p>").append(s).append("</p>"); |
|
|
|
body.append("<p>").append(s).append("</p>"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
String html = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; |
|
|
|
String html = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; |
|
|
|
html += "<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\">"; |
|
|
|
html += "<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\">"; |
|
|
|
html += "<head><title>" + title + "</title>" + |
|
|
|
html += "<head><title>" + title + "</title>" + |
|
|
|