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

HTML files validation #221

Open
divyansh-2001 opened this issue Dec 2, 2024 · 1 comment
Open

HTML files validation #221

divyansh-2001 opened this issue Dec 2, 2024 · 1 comment
Labels
enhancement New feature or request new validation type New config file type to validate

Comments

@divyansh-2001
Copy link

One potential library is golang.org/x/net

@kehoecj kehoecj added enhancement New feature or request new validation type New config file type to validate labels Dec 18, 2024
@skirtan1
Copy link

I would like to work on this, however I have a few questions.

  1. What does having configs in html accomplish and why not just use xml instead ?

  2. Following the previous question, what does validating a html file mean ? Does it mean that it is 'well-formed' to the standard or does it mean a browser can render it ? because browsers can render ill-formed html files.

According to my understanding, using golang.org/x/net, we can parse a string, to a dom tree and again convert it to a string to compare with the input and they should compare equal if the html is well formed.

docs:
Parse: https://pkg.go.dev/golang.org/x/[email protected]/html#Parse
Render: https://pkg.go.dev/golang.org/x/[email protected]/html#Render

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new validation type New config file type to validate
Projects
None yet
Development

No branches or pull requests

3 participants