question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not really sure if this is something Staticman should handle or not, but putting this out there.

I recently was made aware that arbitrary HTML could be passed in my comments. Which basically means someone can drop in <style> or <script> tags into a comment’s message and mess with the page.

Easy way around that would be to use Jekyll’s strip_html filter on that data, but that ruins the ability to leave nicely formatted code blocks written in Markdown… which go through the markdownify filter.

This isn’t that big of an issue for me since I have moderation on, but for those who blindly let Staticman publish comments they could be exposing their site.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
eduardoboucascommented, Dec 18, 2017

Definitely something we can do. Thanks for flagging, I’ll look into that.

0reactions
metapodcodcommented, Dec 3, 2021

@mmistakes @eduardoboucas It’s been 4 years, hasn’t found a solution yet? Anyone have any ideas on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

sanitize-html - npm
sanitize -html provides a simple HTML sanitizer with a clear API. sanitize-html is tolerant. It is well suited for cleaning up HTML fragments ......
Read more >
HTML Sanitizer API - MDN Web Docs
The HTML Sanitizer API allow developers to take untrusted strings of HTML and Document or DocumentFragment objects, and sanitize them for ...
Read more >
HTML sanitization - Wikipedia
In data sanitization, HTML sanitization is the process of examining an HTML document and producing a new HTML document that preserves only whatever...
Read more >
What you need to know about inbuilt browser HTML sanitization
HTML sanitization is an OWASP-recommended strategy to prevent XSS vulnerabilities in web applications. HTML sanitization offers a security ...
Read more >
Top 5 sanitize-html Code Examples - Snyk
Learn more about how to use sanitize-html, based on sanitize-html code examples created from the most popular ways it is used in public...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found