Skip to content

Commit 1b0e836

Browse files
committed
slice -> substring
1 parent 88e2146 commit 1b0e836

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/internal/ssr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ export function escape(html: string, is_attr = false) {
8484
while (pattern.test(html)) {
8585
const i = pattern.lastIndex - 1;
8686
const ch = html[i];
87-
escaped += html.slice(last, i) + (ch === '&' ? '&' : (ch === '"' ? '"' : '<'));
87+
escaped += html.substring(last, i) + (ch === '&' ? '&' : (ch === '"' ? '"' : '<'));
8888
last = i + 1;
8989
}
9090

91-
return escaped + html.slice(last);
91+
return escaped + html.substring(last);
9292
}
9393

9494
export function escape_attribute_value(value) {

0 commit comments

Comments
 (0)