Merge pull request #2927 from Raven24/fix-2922

bookmarklet - escape all passed params in js [ci skip]
This commit is contained in:
Maxwell Salzberg 2012-02-24 10:43:47 -08:00
commit b287cfa714

View file

@ -47,7 +47,7 @@
window.setTimeout(window.close, 2000, true); window.setTimeout(window.close, 2000, true);
}); });
var contents = "#{params[:title]} - #{params[:url]}"; var contents = "#{escape_javascript params[:title]} - #{escape_javascript params[:url]}";
var notes = "#{escape_javascript params[:notes]}"; var notes = "#{escape_javascript params[:notes]}";
if (notes.length > 0){ if (notes.length > 0){
contents = contents + " - " + notes; contents = contents + " - " + notes;