Skip to content
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

Merged
merged 2 commits into from
Mar 5, 2018
Merged

Conversation

mrstegeman
Copy link
Contributor

Fixes #733

@mrstegeman mrstegeman requested a review from hobinjk March 5, 2018 19:38
@ghost ghost assigned mrstegeman Mar 5, 2018
@ghost ghost added the review label Mar 5, 2018
@codecov-io
Copy link

codecov-io commented Mar 5, 2018

Codecov Report

Merging #736 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f533d6c...5cc5581. Read the comment docs.

@@ -72,7 +72,7 @@ var Speech = {
var opts = {
method: 'POST',
cache: 'default',
body: `{"text":"${results[0].text}"}`,
body: `{"text":"${results[0].text.replace(/"/g, '\\"')}"}`,
Copy link
Contributor

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})

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Fixed.

Copy link
Contributor

@hobinjk hobinjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@mrstegeman mrstegeman merged commit 2eae5d5 into WebThingsIO:master Mar 5, 2018
@ghost ghost removed the review label Mar 5, 2018
@mrstegeman mrstegeman deleted the sanitization branch March 5, 2018 20:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants