8000 Escape single quotes in generated HTML by bhollis · Pull Request #174 · bhollis/jsonview · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Escape single quotes in generated HTML #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
JSONView 2.2.1
---
* Escape single quotes in generated HTML.

JSONView 2.2.0
---
* Do not read content type from redirect responses
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "jsonview@brh.numbera.com",
"version": "2.2.0",
"version": "2.2.1",
"name": "jsonview",
"title": "JSONView",
"description": "View JSON documents in the browser.",
Expand Down
1 change: 1 addition & 0 deletions src/jsonformatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function htmlEncode(t: any): string {
return (typeof t !== "undefined" && t !== null) ? t.toString()
.replace(/&/g, "&")
.replace(/"/g, """)
.replace(/'/g, "'")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
: '';
Expand Down
0