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 Injections #55

Open
FuadEfendi opened this issue Oct 27, 2024 · 2 comments
Open

HTML Injections #55

FuadEfendi opened this issue Oct 27, 2024 · 2 comments

Comments

@FuadEfendi
Copy link

Please try Quiz at bottom of this page: https://javascripttypescriptbooks.com/2/4/2/2/

It is broken; footer is not shown; and it is because of HTML Injections, HTML tags are not escaped. When I try to escape it, JavaScript shows "escaped" too such as in this example: Place scripts in the <head>

### Where is it recommended to place non-essential internal scripts for optimal page load performance?

- [ ] In the `<head>` section
- [x] At the end of the `<body>` section
- [ ] In an external file
- [ ] In a `<div>` element

> **Explanation:** Placing non-essential scripts at the end of the `<body>` allows the HTML content to load first, improving perceived performance.
@FuadEfendi
Copy link
Author

Ok I know how to fix it, I need to use escaped &lt;head&gt; in Markdown. "User error"; please close this issue.

@FuadEfendi
Copy link
Author

Finally I reported this bug and workaround to Hugo:
https://discourse.gohugo.io/t/fake-replace-fixes-possible-bug-with-shortcodes/52155

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