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

[FIX] convert_html_fragment: Don't wrap full XMLs #352

Merged

Conversation

pedrobaeza
Copy link
Member

If the HTML string to convert is a fully XML compliant file including the header <?xml version="...?>, the wrapping process is breaking the final result, as the expected XML syntax doesn't include ? in the middle and lxml returns a weird result <?xml version="...??> with 2 interrogations.

With this commit, we are not wrapping if we detect the XML header.

Fine-tune of #349

@Tecnativa

If the HTML string to convert is a fully XML compliant file including
the header `<?xml version="...?>`, the wrapping process is breaking the
final result, as the expected XML syntax doesn't include `?` in the
middle and lxml returns a weird result `<?xml version="...??>` with 2
interrogations.

With this commit, we are not wrapping if we detect the XML header.
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pedrobaeza pedrobaeza merged commit 939c6c2 into OCA:master Nov 8, 2023
2 checks passed
@pedrobaeza pedrobaeza deleted the fix-convert_html_fragment-XML_compliant branch November 8, 2023 08:07
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.

2 participants