Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail on detect end of XmlDeclaration #1947

Open
AugustoWYZ opened this issue Apr 28, 2023 · 1 comment
Open

Fail on detect end of XmlDeclaration #1947

AugustoWYZ opened this issue Apr 28, 2023 · 1 comment
Labels
bug Confirmed bug that we should fix

Comments

@AugustoWYZ
Copy link

AugustoWYZ commented Apr 28, 2023

With an xml like this one

<xml>
	<sometag> sometext
		<innertag>
			more text
			<?xmlDeclaration att1="value1" att2="&lt;val2>"?>
		</innertag>
	</sometag>
</xml>

Jsoup is producing output like this

<xml>
	<sometag> sometext
		<innertag>
			more text
			<!--?xmlDeclaration att1="value1" att2="&lt;val2-->"?&gt;
		</innertag>
	</sometag>
</xml>

That does change the structure of the xml

@jhy jhy added the bug Confirmed bug that we should fix label Oct 18, 2023
@jhy
Copy link
Owner

jhy commented Oct 18, 2023

Confirmed. The current XML Tree Builder for XML declaration is a bit wonky and relies on the HTML parser and bogus HTML comments. Needs a cleanup / re-implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug that we should fix
Projects
None yet
Development

No branches or pull requests

2 participants