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

Check for invalid HTML #356

Open
asgrim opened this issue Jan 2, 2024 · 1 comment
Open

Check for invalid HTML #356

asgrim opened this issue Jan 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@asgrim
Copy link
Member

asgrim commented Jan 2, 2024

diff --git a/test/fixture/docbook/test.md b/test/fixture/docbook/test.md
index fe86218..0d4a9f7 100644
--- a/test/fixture/docbook/test.md
+++ b/test/fixture/docbook/test.md
@@ -22,6 +22,10 @@ This is some markdown
 }
 ```
 
+## Test invalid HTML
+
+This particular part <has> some <invalid> HTML tags. This breaks Confluence!
+
 ## Subtitle
 
 Links [here](https://www.google.com). **Bold**, _italic_, ~~strikethrough~~, `inline code`.

Applying this diff to the test fixtures will generate invalid HTML. We should add a check after generating the HTML that it is valid.

To reproduce:

  • Apply the above addition to the test fixture
  • Run make test-output to generate the build/index.html
  • Upload/copy the contents of build/index.html into the W3 Validator

Observation:

Screenshot from 2024-01-02 09-27-22

Perhaps there is a validator library to do this, so we can pass it through there before proceeding?

@asgrim asgrim added the enhancement New feature or request label Jan 2, 2024
@Ocramius
Copy link
Member

Ocramius commented Jan 2, 2024

It should be possible to do local DTD validation 🤔

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

No branches or pull requests

2 participants