Skip to content

Commit e02ce9f

Browse files
benmccannmrkishi
andauthored
Update src/runtime/internal/ssr.ts
Co-authored-by: Maurício Kishi <[email protected]>
1 parent 61e180b commit e02ce9f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/runtime/internal/ssr.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ export function escape(html: string, is_attr = false) {
8585
let escaped = '';
8686
let last = 0;
8787

88-
while (pattern.test(html)) {
89-
const i = pattern.lastIndex - 1;
90-
const ch = html[i];
91-
escaped += html.substring(last, i) + (ch === '&' ? '&amp;' : (ch === '"' ? '&quot;' : '&lt;'));
92-
last = i + 1;
93-
}
88+
while (pattern.test(html)) {
89+
const i = pattern.lastIndex - 1;
90+
const ch = html[i];
91+
escaped += html.substring(last, i) + (ch === '&' ? '&amp;' : (ch === '"' ? '&quot;' : '&lt;'));
92+
last = i + 1;
93+
}
9494

9595
return escaped + html.substring(last);
9696
}

0 commit comments

Comments
 (0)