diff --git a/src/Squidex/app/framework/angular/forms/iframe-editor.component.html b/src/Squidex/app/framework/angular/forms/iframe-editor.component.html
index 44f811b58..41a07a468 100644
--- a/src/Squidex/app/framework/angular/forms/iframe-editor.component.html
+++ b/src/Squidex/app/framework/angular/forms/iframe-editor.component.html
@@ -1 +1 @@
-
+
diff --git a/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts b/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts
index bdbd181f3..374da7303 100644
--- a/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts
+++ b/src/Squidex/app/framework/angular/forms/iframe-editor.component.ts
@@ -7,7 +7,7 @@
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, forwardRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
-import { DomSanitizer } from '@angular/platform-browser';
+import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { Types } from '@app/framework/internal';
@@ -35,7 +35,11 @@ export class IFrameEditorComponent implements ControlValueAccessor, AfterViewIni
public iframe: ElementRef;
@Input()
- public url: string;
+ public set url(value: string) {
+ this.sanitizedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(value);
+ }
+
+ public sanitizedUrl: SafeResourceUrl;
constructor(
private readonly sanitizer: DomSanitizer,
@@ -83,10 +87,6 @@ export class IFrameEditorComponent implements ControlValueAccessor, AfterViewIni
});
}
- public sanitizedUrl() {
- return this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
- }
-
public writeValue(obj: any) {
this.value = obj;