You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2020/07/10 03:34:17 UTC
[sling-org-apache-sling-app-cms] 01/04: Use the name rather than
the localname for the html5 parser
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit 1eba4cce1b60e865281b7f68ff3c371d1c0818df
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Jul 9 23:24:28 2020 -0400
Use the name rather than the localname for the html5 parser
---
.../sling/cms/core/internal/rewriter/HTML5Serializer.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/rewriter/HTML5Serializer.java b/core/src/main/java/org/apache/sling/cms/core/internal/rewriter/HTML5Serializer.java
index 4b5627c..214d30e 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/rewriter/HTML5Serializer.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/rewriter/HTML5Serializer.java
@@ -78,10 +78,10 @@ public class HTML5Serializer implements Serializer {
}
@Override
- public void endElement(String uri, String localName, String name) throws SAXException {
+ public void endElement(String uri, String localName, String qName) throws SAXException {
if (!emptyTags.contains(localName)) {
writer.write("</");
- writer.write(localName);
+ writer.write(qName);
writer.write(CHAR_GT);
}
}
@@ -127,10 +127,10 @@ public class HTML5Serializer implements Serializer {
}
@Override
- public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException {
+ public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
boolean endSlash = false;
writer.write(CHAR_LT);
- writer.write(localName);
+ writer.write(qName);
for (int i = 0; i < atts.getLength(); i++) {
if ("endSlash".equals(atts.getQName(i))) {
@@ -141,7 +141,7 @@ public class HTML5Serializer implements Serializer {
continue;
}
writer.write(CHAR_SP);
- writer.write(atts.getLocalName(i));
+ writer.write(atts.getQName(i));
writer.write(CHAR_EQ);
writer.write('"');