-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sanitize HTML and URLs. #736
Conversation
Codecov Report
@@ Coverage Diff @@
## master #736 +/- ##
=======================================
Coverage 78.93% 78.93%
=======================================
Files 84 84
Lines 3408 3408
Branches 448 448
=======================================
Hits 2690 2690
Misses 660 660
Partials 58 58 Continue to review full report at Codecov.
|
static/js/speech.js
Outdated
@@ -72,7 +72,7 @@ var Speech = { | |||
var opts = { | |||
method: 'POST', | |||
cache: 'default', | |||
body: `{"text":"${results[0].text}"}`, | |||
body: `{"text":"${results[0].text.replace(/"/g, '\\"')}"}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a bit more general as
body: JSON.stringify({text: results[0].text})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Fixes #733