Skip to content

Commit

Permalink
fix: cleanSimpleHtml function regexp greedyness (issue #8285) (#8286)
Browse files Browse the repository at this point in the history
* Fixes issue #8285

* Remove unnecesary escapes
  • Loading branch information
bluescreen10 committed Jan 14, 2021
1 parent 2d7a0da commit 8084ea3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/datasource/pypi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
)
);
Expand Down

0 comments on commit 8084ea3

Please sign in to comment.