diff --git a/src/filters/html.ts b/src/filters/html.ts
index 0dd5f77d3..bb603b1dc 100644
--- a/src/filters/html.ts
+++ b/src/filters/html.ts
@@ -45,5 +45,34 @@ export function newline_to_br (this: FilterImpl, v: string) {
export function strip_html (this: FilterImpl, v: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
- return str.replace(/', lt + 7)
+ if (scriptEnd >= 0) end = scriptEnd + 9
+ } else if (str.startsWith('