Benjol / SE-AutoReviewComments

AutoReviewComments - Pro-forma comments for SE
http://stackapps.com/q/2116
98 stars 39 forks source link

Exporting jsonp with quotes in the title will not escape them #106

Open gunr2171 opened 9 years ago

gunr2171 commented 9 years ago

I have the following auto-comment entries I wrote myself:

###[Q] "Why won't it work?" questions with no code
It seems you have a problem with your code. However, we can't help unless we have [code or information that can reproduce the problem](http://$SITEURL$/help/mcve). Otherwise, we are just blindly guessing.

###[Q] 'Need to make program' but no question
All that has been posted is a program description. However, we need you to [ask a question](http://$SITEURL$/help/how-to-ask). We can't be sure what you want from us. Please [edit] your post to include a valid question that we can answer. Reminder: make sure you know [what is on-topic here](http://$SITEURL$/help/on-topic), asking us to write the program for you and suggestions are off-topic.

However, when they are exported to jsonp it renders as this:

{ "name": "[Q] "Why won't it work?" questions with no code", "description": "It seems you have a problem with your code. However, we can't help unless we have <a href=\"http://$SITEURL$/help/mcve\">code or information that can reproduce the problem</a>. Otherwise, we are just blindly guessing."},

{ "name": "[Q] 'Need to make program' but no question", "description": "All that has been posted is a program description. However, we need you to <a href=\"http://$SITEURL$/help/how-to-ask\">ask a question</a>. We can't be sure what you want from us. Please [edit] your post to include a valid question that we can answer. Reminder: make sure you know <a href=\"http://$SITEURL$/help/on-topic\">what is on-topic here</a>, asking us to write the program for you and suggestions are off-topic."},

Notice that the quotes on the titles are not being escaped. Quotes in the body are being escaped though.