Merge pull request #1983 from driscoll/bugfixes
Replacing deprecated method from cgi with html.escape()
This commit is contained in:
commit
43fa246bf2
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ snippet #577349 on http://code.activestate.com.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import cgi
|
from html import escape as html_escape
|
||||||
from .ansi import *
|
from .ansi import *
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -304,7 +304,7 @@ class TextToHTMLparser(object):
|
||||||
"""
|
"""
|
||||||
cdict = match.groupdict()
|
cdict = match.groupdict()
|
||||||
if cdict["htmlchars"]:
|
if cdict["htmlchars"]:
|
||||||
return cgi.escape(cdict["htmlchars"])
|
return html_escape(cdict["htmlchars"])
|
||||||
elif cdict["lineend"]:
|
elif cdict["lineend"]:
|
||||||
return "<br>"
|
return "<br>"
|
||||||
elif cdict["firstspace"]:
|
elif cdict["firstspace"]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue