Skip to content
Snippets Groups Projects
Commit b5ce2535 authored by jojohoch's avatar jojohoch
Browse files

Use pipe `safeResourceHTML` instead of method to sanitize innerHTML

parent fa903a13
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ import { LikertRadioButtonGroupComponent } from './likert-radio-button-group.com
<img *ngIf="column.imgSrc && column.imgPosition === 'above'"
[src]="column.imgSrc | safeResourceUrl" alt="Image Placeholder"
[style.object-fit]="'scale-down'">
<div [innerHTML]="sanitizer.bypassSecurityTrustHtml(column.text)"></div>
<div [innerHTML]="column.text | safeResourceHTML"></div>
<img *ngIf="column.imgSrc && column.imgPosition === 'below'"
[src]="column.imgSrc | safeResourceUrl" alt="Image Placeholder"
[style.object-fit]="'scale-down'">
......
......@@ -30,7 +30,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di
[value]="i"
[style.pointer-events]="elementModel.readOnly ? 'none' : 'unset'"
[style.line-height.%]="elementModel.styling.lineHeight">
<div class="radio-button-label" [innerHTML]="sanitizer.bypassSecurityTrustHtml(option.text)"></div>
<div class="radio-button-label" [innerHTML]="option.text | safeResourceHTML"></div>
</mat-radio-button>
<mat-error *ngIf="elementFormControl.errors && elementFormControl.touched"
class="error-message">
......
......@@ -22,7 +22,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di
[style.object-fit]="'scale-down'"
[style.max-width.%]="100"
[src]="option.imgSrc | safeResourceUrl" alt="Image Placeholder">
<div [innerHTML]="sanitizer.bypassSecurityTrustHtml(option.text)"
<div [innerHTML]="option.text | safeResourceHTML"
[style.background-color]="elementModel.styling.backgroundColor"
[style.color]="elementModel.styling.fontColor"
[style.font-family]="elementModel.styling.font"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment