Navigation Menu

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

Mark source_url contents as safe #861

Merged
merged 1 commit into from Nov 27, 2020
Merged

Conversation

michaeljones
Copy link
Contributor

Otherwise they are escaped by the template engine and whilst firefox and maybe other browsers still handles the output, the urls look broken in the source code.

Sorry I failed to notice this before. I guess it also raises questions if anything in a gleam module name or project name can be unsafe for html but I image we don't allow modules called javascript: fetch("./secure/details") (or whatever scripting hacks look like.)

Otherwise they are escaped by the template engine and whilst firefox and
maybe other browsers still handles the output, the urls look broken in
the source code.
Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Hexdoc is an isolated domain, so I think this is safe even if the user finds a way to inject something naughty into the docs. Heck, they could always edit the HTML before uploading it so it doesn't really matter what we do here.

@lpil lpil merged commit 5e47daf into gleam-lang:main Nov 27, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants