Skip to content

Allow attributes valid in html when converting#1648

Merged
jhy merged 4 commits intojhy:masterfrom
jairamc:bug/html-dom-with-accent-chars
Oct 6, 2021
Merged

Allow attributes valid in html when converting#1648
jhy merged 4 commits intojhy:masterfrom
jairamc:bug/html-dom-with-accent-chars

Conversation

@jairamc
Copy link
Copy Markdown
Contributor

@jairamc jairamc commented Sep 29, 2021

When parsing and converting an html document, the "syntax" was hard-coded to xml. This PR checks the document type of the output document and uses that to determine which attributes are valid.

Changes for #1647

When parsing and converting an html document, the "syntax" was hard-coded to xml. This PR checks the document type of the output document and uses that to determine which attributes are valid.
Comment thread src/main/java/org/jsoup/helper/W3CDom.java Outdated
Jairam Chandar and others added 3 commits October 5, 2021 13:53
@jhy jhy merged commit 6b1fbb5 into jhy:master Oct 6, 2021
@jhy
Copy link
Copy Markdown
Owner

jhy commented Oct 6, 2021

Thanks! I updated the commit a little to preserve the current public constructor of the W3CBuilder, to maintain backcompat. And to reuse the existing ownerDocument scan up, and to add a negative (XML syntax) check.

@jairamc jairamc deleted the bug/html-dom-with-accent-chars branch October 6, 2021 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow attributes valid in html when converting from JSoup to W3C Document

2 participants