Re: Would you build a pure client-side JavaScript App using ...
by ktsmith on Friday April 08, 2011 @05:51PM
(#2425737)
I wasn't trying to pick on your wiki app, it was just a readily available example where input/output sanitization wasn't happening. I'm not sure what your target demographic is, but I would be surprised if this wasn't a very common problem that your potential users encounter. One of the advantages of many of the server side frameworks is that they provide this type of sanitization for free.
[ Parent
| on HN ]
Re: Would you build a pure client-side JavaScript App using ...
by mckoss on Friday April 08, 2011 @08:40PM
(#2426123)
Yeah. In this app I used the (very nice) ShownDown.js as a MarkDown format generator. Which DOES properly sanitize most input. I then added the special <script> evaluation stuff as a cool "hack".
As client-side JavaScript gets more mature, I do expect there to be more frameworks that will just "do the right thing" for developers who write code like this.