From 8084ea3d9c16bcade02a5332a2ae12f59c7fc082 Mon Sep 17 00:00:00 2001
From: Mariano Wahlmann <dichoso@gmail.com>
Date: Thu, 14 Jan 2021 02:01:42 -0600
Subject: [PATCH] fix: cleanSimpleHtml function regexp greedyness (issue #8285)
 (#8286)

* Fixes issue #8285

* Remove unnecesary escapes
---
 lib/datasource/pypi/index.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/datasource/pypi/index.ts b/lib/datasource/pypi/index.ts
index 2e98b5e5b9..19bee498cf 100644
--- a/lib/datasource/pypi/index.ts
+++ b/lib/datasource/pypi/index.ts
@@ -172,11 +172,11 @@ function cleanSimpleHtml(html: string): string {
       .replace(/<\/?pre>/, '')
       // Certain simple repositories like artifactory don't escape > and <
       .replace(
-        /data-requires-python="(.*?)>(.*?)"/g,
+        /data-requires-python="([^"]*?)>([^"]*?)"/g,
         'data-requires-python="$1&gt;$2"'
       )
       .replace(
-        /data-requires-python="(.*?)<(.*?)"/g,
+        /data-requires-python="([^"]*?)<([^"]*?)"/g,
         'data-requires-python="$1&lt;$2"'
       )
   );
-- 
GitLab