Skip to content

Commit 7cd5d92

Browse files
committed
Mitigated super-linear backtracking in regex
1 parent db406af commit 7cd5d92

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

chatgpt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ const chatgpt = {
13981398

13991399
renderHTML(node) {
14001400
const reTags = /<([a-z\d]+)\b([^>]*)>([\s\S]*?)<\/\1>/g,
1401-
reAttributes = /(\S+)=['"]?((?:.(?!['"]?\s+\S+=|[>']))+.)['"]?/g,
1401+
reAttributes = /(\S+)=['"]?((?:.(?!['"]?\s+\S+=|[>']))+.)['"]?/g, // eslint-disable-line
14021402
nodeContent = node.childNodes;
14031403

14041404
// Preserve consecutive spaces + line breaks

0 commit comments

Comments
 (0)