Users can edit "articles" in my application. Each article is mastered in the DB and sent to the client as Markdown -- I convert it to HTML client side with Javascript.
I'm doing this so that when the user wants to edit the article he can edit and POST the Markdown right back to the server (since it's already on the page).
My question is how to sanitize the Markdown I send to the client -- can I just use Rails' sanitize
helper?
Also, any thoughts on this approach in general? Another strategy I thought of was rendering and sanitizing the HTML on the server, and pulling the Markdown to the client only if the user wants to edit the article.