diff options
author | Mickaël Schoentgen <contact@tiger-222.fr> | 2019-01-05 23:20:39 +0100 |
---|---|---|
committer | Mickaël Schoentgen <contact@tiger-222.fr> | 2019-01-05 23:37:48 +0100 |
commit | 3a2d7bb119828613f2a40b936b1a4d5c40125ccb (patch) | |
tree | 4bad85cba8497e3c5fbfe2fb95c2ea50b6639a2e /mitmproxy/contentviews | |
parent | 889987aa0a7f4852758ed09f70fe5d30f733a6d3 (diff) | |
download | mitmproxy-3a2d7bb119828613f2a40b936b1a4d5c40125ccb.tar.gz mitmproxy-3a2d7bb119828613f2a40b936b1a4d5c40125ccb.tar.bz2 mitmproxy-3a2d7bb119828613f2a40b936b1a4d5c40125ccb.zip |
Fix several DeprecationWarning: invalid escape sequence
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
Diffstat (limited to 'mitmproxy/contentviews')
-rw-r--r-- | mitmproxy/contentviews/css.py | 2 | ||||
-rw-r--r-- | mitmproxy/contentviews/javascript.py | 4 | ||||
-rw-r--r-- | mitmproxy/contentviews/xml_html.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/mitmproxy/contentviews/css.py b/mitmproxy/contentviews/css.py index cbe8ce62..44b33761 100644 --- a/mitmproxy/contentviews/css.py +++ b/mitmproxy/contentviews/css.py @@ -16,7 +16,7 @@ A custom CSS prettifier. Compared to other prettifiers, its main features are: CSS_SPECIAL_AREAS = ( "'" + strutils.SINGLELINE_CONTENT + strutils.NO_ESCAPE + "'", '"' + strutils.SINGLELINE_CONTENT + strutils.NO_ESCAPE + '"', - r"/\*" + strutils.MULTILINE_CONTENT + "\*/", + r"/\*" + strutils.MULTILINE_CONTENT + r"\*/", "//" + strutils.SINGLELINE_CONTENT + "$" ) CSS_SPECIAL_CHARS = "{};:" diff --git a/mitmproxy/contentviews/javascript.py b/mitmproxy/contentviews/javascript.py index 1440ea5d..b5f09150 100644 --- a/mitmproxy/contentviews/javascript.py +++ b/mitmproxy/contentviews/javascript.py @@ -10,9 +10,9 @@ SPECIAL_AREAS = ( r"'" + strutils.MULTILINE_CONTENT_LINE_CONTINUATION + strutils.NO_ESCAPE + "'", r'"' + strutils.MULTILINE_CONTENT_LINE_CONTINUATION + strutils.NO_ESCAPE + '"', r'`' + strutils.MULTILINE_CONTENT + strutils.NO_ESCAPE + '`', - r"/\*" + strutils.MULTILINE_CONTENT + "\*/", + r"/\*" + strutils.MULTILINE_CONTENT + r"\*/", r"//" + strutils.SINGLELINE_CONTENT + "$", - r"for\(" + strutils.SINGLELINE_CONTENT + "\)", + r"for\(" + strutils.SINGLELINE_CONTENT + r"\)", ) diff --git a/mitmproxy/contentviews/xml_html.py b/mitmproxy/contentviews/xml_html.py index 658fbcd7..00a62a15 100644 --- a/mitmproxy/contentviews/xml_html.py +++ b/mitmproxy/contentviews/xml_html.py @@ -18,7 +18,7 @@ The implementation is split into two main parts: tokenization and formatting of """ # http://www.xml.com/pub/a/2001/07/25/namingparts.html - this is close enough for what we do. -REGEX_TAG = re.compile("[a-zA-Z0-9._:\-]+(?!=)") +REGEX_TAG = re.compile(r"[a-zA-Z0-9._:\-]+(?!=)") # https://www.w3.org/TR/html5/syntax.html#void-elements HTML_VOID_ELEMENTS = { "area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", |