fix(strip_html): infinite loop for strip_html

This commit is contained in:
Yang Jun
2026-06-22 02:28:07 +08:00
committed by GitHub
parent 6d00257e15
commit 5c3522f339
4 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ export function strip_html (this: FilterImpl, v: string) {
if (e >= 0) { i = e + closer.length; break }
blocks.delete(opener)
}
if (i === lt) return out + str.slice(lt)
if (i <= lt) return out + str.slice(lt)
}
return out
}