From 9795545fb662b93377e2615c2d02c4ea7a5ad59b Mon Sep 17 00:00:00 2001 From: Joseph Marie Alba Date: Sun, 16 May 2021 06:13:14 +0800 Subject: [PATCH] fix: DeprecationWarning: invalid escape sequence \< Python 3 interprets string literals as Unicode strings, and therefore your \< and \> are treated as an escaped Unicode character. Declare your RegEx pattern as a raw string instead by prepending r --- frappe/www/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/www/app.py b/frappe/www/app.py index 6088c413dc..5f19712cd3 100644 --- a/frappe/www/app.py +++ b/frappe/www/app.py @@ -34,10 +34,10 @@ def get_context(context): boot_json = frappe.as_json(boot) # remove script tags from boot - boot_json = re.sub("\", "", boot_json) + boot_json = re.sub(r"\", "", boot_json) # TODO: Find better fix - boot_json = re.sub("", "", boot_json) + boot_json = re.sub(r"", "", boot_json) context.update({ "no_cache": 1,