File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,11 @@ function ensureLanguagesRegistered (): void {
124124
125125function escapeHtml ( value : string ) : string {
126126 return value
127- . replaceAll ( '&' , '&' )
128- . replaceAll ( '<' , '<' )
129- . replaceAll ( '>' , '>' )
130- . replaceAll ( '"' , '"' )
131- . replaceAll ( '\'' , ''' )
127+ . replace ( / & / g , '&' )
128+ . replace ( / < / g , '<' )
129+ . replace ( / > / g , '>' )
130+ . replace ( / " / g , '"' )
131+ . replace ( / ' / g , ''' )
132132}
133133
134134function normalizeLanguageFromClass ( className ?: string | null ) : string | null {
Original file line number Diff line number Diff line change @@ -124,11 +124,11 @@ function ensureLanguagesRegistered (): void {
124124
125125function escapeHtml ( value : string ) : string {
126126 return value
127- . replaceAll ( '&' , '&' )
128- . replaceAll ( '<' , '<' )
129- . replaceAll ( '>' , '>' )
130- . replaceAll ( '"' , '"' )
131- . replaceAll ( '\'' , ''' )
127+ . replace ( / & / g , '&' )
128+ . replace ( / < / g , '<' )
129+ . replace ( / > / g , '>' )
130+ . replace ( / " / g , '"' )
131+ . replace ( / ' / g , ''' )
132132}
133133
134134function normalizeLanguageFromClass ( className ?: string | null ) : string | null {
You can’t perform that action at this time.
0 commit comments