Skip to content

Commit

Permalink
Use escape from markupsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Mar 25, 2022
1 parent 1211cb2 commit 0fead52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbconvert/filters/ansi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Distributed under the terms of the Modified BSD License.

import re
import jinja2
from markupsafe import escape

__all__ = [
'strip_ansi',
Expand Down Expand Up @@ -57,7 +57,7 @@ def ansi2html(text):
Text containing ANSI colors to convert to HTML
"""
text = jinja2.utils.escape(text)
text = escape(text)
return _ansi2anything(text, _htmlconverter)


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def get_data_files():
)

setup_args['install_requires'] = [
'markupsafe<3',
'mistune>=0.8.1,<2',
'jinja2>=2.4',
'pygments>=2.4.1',
Expand Down

0 comments on commit 0fead52

Please sign in to comment.