GithubHelp home page GithubHelp logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Luckily, Stack Overflow seems to have an extra layer of protection 
(`sanitizeAndSplitTags`, perhaps?) that prevents XSS attacks like this one. 
However, it would be useful to have this protection for all Pagedown users.

Original comment by [email protected] on 9 Aug 2012 at 1:40

from pagedown.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
This is absolutely by design.

Markdown allows you to do whatever you want. After all, you might just be using 
it to create your own blog, and you should be able to do whatever you want 
there.

And you didn't even have to go through some strange quote-less onload 
pseudo-exploit -- <script>alert(1)</script> works just as fine.

Of course if you're using Markdown for user-submitted content, you want to 
sanitize. As you said "Luckily, Stack Overflow seems to have an extra layer of 
protection [...] However, it would be useful to have this protection for all 
Pagedown users."

Well guess what, you have it! From the *introduction* of the documentation 
(http://code.google.com/p/pagedown/wiki/PageDown):

It should be noted that Markdown is not safe as far as user-entered input goes. 
Pretty much anything is valid in Markdown, in particular something like 
<script>doEvil();</script>. This PageDown repository includes the two plugins 
that Stack Exchange uses to sanitize the user's input; see the description of 
Markdown.Sanitizer.js below.

Original comment by [email protected] on 9 Aug 2012 at 3:21

  • Changed state: Invalid

from pagedown.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
*facepalms* Thanks for your patience!

Original comment by [email protected] on 9 Aug 2012 at 3:23

from pagedown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.