Skip to content

Commit caa004d

Browse files
committed
fix: replace deprecated flask.escape with markupsafe.escape
Updates tests/rkls_github_canned_server.py to use markupsafe.escape instead of the deprecated flask.escape function. The flask.escape function is now deprecated and will be removed in a future Flask release, so this change ensures forward compatibility.
1 parent cf8588c commit caa004d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/rkls_github_canned_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import flask
22
import json
33
import os
4+
from markupsafe import escape
45

56

67
def create_app(test_config=None):
@@ -9,8 +10,8 @@ def create_app(test_config=None):
910
@app.route("/api/repos/<github_user>/<github_repo>/contents/")
1011
def github_plugins_repo_api(github_user, github_repo):
1112
'''This emulates api.github.com calls to lightningd/plugins'''
12-
user = flask.escape(github_user)
13-
repo = flask.escape(github_repo)
13+
user = escape(github_user)
14+
repo = escape(github_repo)
1415
canned_api = os.environ.get('REDIR_GITHUB') + f'/rkls_api_{user}_{repo}.json'
1516
with open(canned_api, 'rb') as f:
1617
canned_data = f.read(-1)

0 commit comments

Comments
 (0)