fixup! TF-4224 Reduce ReDoS vulnerability

This commit is contained in:
Dang Dat
2026-01-05 17:01:59 +07:00
committed by Dat H. Pham
parent b4fdc55a07
commit 060416292f
4 changed files with 59 additions and 4 deletions
+9
View File
@@ -39,6 +39,15 @@ class HtmlUtils {
caseSensitive: false,
);
@visibleForTesting
static RegExp get htmlStartTagRegex => _htmlStartTagRegex;
@visibleForTesting
static RegExp get htmlEndTagRegex => _htmlEndTagRegex;
@visibleForTesting
static RegExp get urlRegex => _urlRegex;
static const removeLineHeight1px = (
script: '''
document.querySelectorAll('[style*="line-height"]').forEach(el => {