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

Disable Hugo's native HTML warning #96

Closed
mark-wiemer opened this issue Dec 21, 2024 · 5 comments
Closed

Disable Hugo's native HTML warning #96

mark-wiemer opened this issue Dec 21, 2024 · 5 comments

Comments

@mark-wiemer
Copy link
Contributor

mark-wiemer commented Dec 21, 2024

We should ensure we know what we're doing, then we can probably remove this warning as it's built for untrusted content. Ref #15 and #95

@wsor4035
Copy link
Collaborator

unless we need to do this, i think its good to leave on? catches cases where we missed escaping something for example

@mark-wiemer
Copy link
Contributor Author

Happy to leave it on by default, but we should look at how to disable it for certain sections of code, there are times when we probably want native HTML like the <caption> tag for images. I know Hugo shortcodes exist for that, but there may be a similar example where a Hugo shortcode isn't needed

@wsor4035
Copy link
Collaborator

your better off using the render image hook in that case, and re using title or alt for a caption https://gohugo.io/render-hooks/images/

@mark-wiemer
Copy link
Contributor Author

@wsor4035 was this completed? If so, can you link the commit/PR? Otherwise can we mark it as not planned for historical purposes?

@wsor4035 wsor4035 reopened this Dec 27, 2024
@wsor4035 wsor4035 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2024
@mark-wiemer
Copy link
Contributor Author

Pinging to ask to re-open, I didn't see that this was closed as not planned. Hoping we can allow native HTML for comments, for example, there are plenty of cases where it's good. I'm not sure where it's exactly bad, honestly--I know missing escaping things is an idea, but I'm not sure how that might happen in practice.

Current issue is with disabling the spell-checker, ref #83 and #136

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

2 participants