Skip to content

Commit bf5ef50

Browse files
committed
chore: only find \r not \n
1 parent afce006 commit bf5ef50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/domparser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if (template && template.content) {
116116
* @returns - HTML string with escaped special characters.
117117
*/
118118
function escapeSpecialCharacters(html: string): string {
119-
return html.replace(/[\r\n]/g, (match) => {
119+
return html.replace(/[\r]/g, (match) => {
120120
if (match === '\r') return '\\r';
121121
return match;
122122
});

0 commit comments

Comments
 (0)