We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61e180b commit e02ce9fCopy full SHA for e02ce9f
src/runtime/internal/ssr.ts
@@ -85,12 +85,12 @@ export function escape(html: string, is_attr = false) {
85
let escaped = '';
86
let last = 0;
87
88
- while (pattern.test(html)) {
89
- const i = pattern.lastIndex - 1;
90
- const ch = html[i];
91
- escaped += html.substring(last, i) + (ch === '&' ? '&' : (ch === '"' ? '"' : '<'));
92
- last = i + 1;
93
- }
+ while (pattern.test(html)) {
+ const i = pattern.lastIndex - 1;
+ const ch = html[i];
+ escaped += html.substring(last, i) + (ch === '&' ? '&' : (ch === '"' ? '"' : '<'));
+ last = i + 1;
+ }
94
95
return escaped + html.substring(last);
96
}
0 commit comments