Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewSC/4886171aa7c141aa5e35f031220d5931 to your computer and use it in GitHub Desktop.
Save andrewSC/4886171aa7c141aa5e35f031220d5931 to your computer and use it in GitHub Desktop.
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