aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mammoth/writers/html.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mammoth/writers/html.py b/mammoth/writers/html.py
index 7e6ca95..262d79e 100644
--- a/mammoth/writers/html.py
+++ b/mammoth/writers/html.py
@@ -1,9 +1,8 @@
from __future__ import unicode_literals
+from xml.sax.saxutils import escape
from .abc import Writer
-import cgi
-
class HtmlWriter(Writer):
def __init__(self):
@@ -31,7 +30,7 @@ class HtmlWriter(Writer):
def _escape_html(text):
- return cgi.escape(text, quote=True)
+ return escape(text, {'"': """})
def _generate_attribute_string(attributes):