From 31b357b8a791798cb4110abf597aedb3c042778b Mon Sep 17 00:00:00 2001 From: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Date: Sat, 19 Oct 2024 13:46:45 +0200 Subject: [PATCH] Revert "Fixed build docs regex security" (#17027) --- docs/build_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_docs.py b/docs/build_docs.py index 281a85f513..483a2dd051 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -199,7 +199,7 @@ def convert_plaintext_links_to_html(content): for text_node in paragraph.find_all(string=True, recursive=False): if text_node.parent.name not in {"a", "code"}: # Ignore links and code blocks new_text = re.sub( - r'\b(https?://(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:/[a-zA-Z0-9\-._~:/?#[\]@!$&\'()*+,;=%]*)?)(?]+(?:\.[^\s()<>]+)+)(?\1', str(text_node), )