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

Switch HTML parsing tool from XMLDocument to HTMLAgilityPack's HTMLDocument #32

Open
tmehyar opened this issue Jul 21, 2022 · 0 comments

Comments

@tmehyar
Copy link

tmehyar commented Jul 21, 2022

I'm working on migrating WFFM forms from 8.x to 10.2. When I first ran the tool, most of the Forms failed due to malformed xml/html. For example they had a self-closing img tag without the ending slash <img src="" > or a tag is opened but never closed. These issues are usually understood by a browser but not XMLDocument.
image
image
image

Switching to HTMLDocument in HtmlAgilityPack will solve these issues as it understands these user error like the browser does.
I would create a new HTMLHelper class that uses HTMLDocument and use it wherever we're parsing content that is edited by authors.
I created a fork from this repo and just edited XMLHelper class to use HTMLDocument to overcome these issues.

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

No branches or pull requests

1 participant