Skip to content

Commit 9b2bcdf

Browse files
committed
docs: Fix security warnings pointed by dependabot
- Bump up jinja2 version - Improve regex for URLs Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
1 parent 846f7bc commit 9b2bcdf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/mkdocs/prepare_mkdocs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
# Regex
2020
reLinks = re.compile(r'\[([^\]]+)\]\(([^)]+)\)')
21-
reURL = re.compile(r'[A-Za-z0-9]+://[A-Za-z0-9%-_]+(/[A-Za-z0-9%-_])*(#|\\?)[A-Za-z0-9%-_&=]*')
21+
# pylint: disable-next=line-too-long
22+
reURL = re.compile(r'^(https?|ftp):\/\/([A-Za-z0-9-]+\.)+[A-Za-z]{2,6}(:\d+)?(\/[A-Za-z0-9-._~:?#[\]@!$&\'()*+,;=\/]*)?$')
2223
reMAIL = re.compile(r'mailto:.*')
2324
reANCHOR = re.compile(r'^#.*')
2425

docs/mkdocs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
jinja2<3.1.0
1+
jinja2>=3.1.6
22
mkdocs==1.3.1

0 commit comments

Comments
 (0)