Skip to content

Commit 611d6de

Browse files
author
Davide Negretti
committed
[DSC-745] Keep HTML and XML as plain text
1 parent e52336d commit 611d6de

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/rendering-type-value.model.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ export abstract class RenderingTypeValueModelComponent extends RenderingTypeMode
3838
* @param text
3939
*/
4040
formatText(text: string): string {
41-
const htmlTagRegex = /<.*?>/;
4241
const newlineRegex = /\n/g;
43-
return text.replace(htmlTagRegex, '').replace(newlineRegex, '<br>');
42+
return text.replace('>', '&gt;').replace('<', '&lt;').replace(newlineRegex, '<br>');
4443
}
4544

4645
}

0 commit comments

Comments
 (0)