From 65bf0880d34c416257cd49a4b1bf2be209d3ba83 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Wed, 17 Jun 2020 19:27:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-33908=20HTML=E9=AB=98=E5=BA=A6=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=BC=82=E5=B8=B8=EF=BC=88br=E3=80=81hr=20=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E4=B8=AD=E7=9A=84line-height=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E8=AF=A5=E7=94=9F=E6=95=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third/v2/lowagie/text/html/simpleparser/HTMLWorker.java | 6 ++---- .../v2/lowagie/text/xml/simpleparser/SimpleXMLParser.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java index 9bce7242f..74628ff53 100644 --- a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java +++ b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java @@ -244,8 +244,7 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { } if (tag.equals(HtmlTags.NEWLINE)) { if (currentParagraph == null) { - currentParagraph = FactoryProperties - .createParagraph(cprops); + currentParagraph = new Paragraph(); } currentParagraph.add(factoryProperties .createChunk("\n", cprops)); @@ -258,8 +257,7 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { // end with a break, but a trailing break is always inserted. boolean addLeadingBreak = true; if (currentParagraph == null) { - currentParagraph = FactoryProperties - .createParagraph(cprops); + currentParagraph = new Paragraph(); addLeadingBreak = false; } if (addLeadingBreak) { // Not a new paragraph diff --git a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/xml/simpleparser/SimpleXMLParser.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/xml/simpleparser/SimpleXMLParser.java index 3e765d52e..ea05a882d 100644 --- a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/xml/simpleparser/SimpleXMLParser.java +++ b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/xml/simpleparser/SimpleXMLParser.java @@ -494,7 +494,7 @@ public final class SimpleXMLParser { if (c == -1) { return; } - if (c == '/' || HTMLWorker.tagsPrefixSupported.containsKey(c)) { + if (c == '/' || HTMLWorker.tagsPrefixSupported.containsKey(Character.toLowerCase(c))) { if (type == TEXT) { flush(); }