Created
November 19, 2019 10:48
-
-
Save andrewSC/4886171aa7c141aa5e35f031220d5931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/isso/views/comments.py b/isso/views/comments.py | |
index 973661f..e39d42d 100644 | |
--- a/isso/views/comments.py | |
+++ b/isso/views/comments.py | |
@@ -3,7 +3,7 @@ | |
from __future__ import unicode_literals | |
* | |
import re | |
-import cgi | |
+import html | |
import time | |
import functools | |
import json # json.dumps to put URL in <script> | |
@@ -261,7 +261,7 @@ class API(object): | |
* | |
for field in ("author", "email", "website"): | |
if data.get(field) is not None: | |
- data[field] = cgi.escape(data[field]) | |
+ data[field] = html.escape(data[field]) | |
* | |
if data.get("website"): | |
data["website"] = normalize(data["website"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment