diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html
index f32dc2beb..3cc017cc9 100644
--- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html
+++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html
@@ -31,7 +31,7 @@
diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.ts b/client/src/app/site/users/components/user-detail/user-detail.component.ts
index ec1e9654d..98ce79ab2 100644
--- a/client/src/app/site/users/components/user-detail/user-detail.component.ts
+++ b/client/src/app/site/users/components/user-detail/user-detail.component.ts
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material';
-import { Title } from '@angular/platform-browser';
+import { Title, SafeHtml, DomSanitizer } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core';
@@ -96,7 +96,8 @@ export class UserDetailComponent extends BaseViewComponent implements OnInit {
private operator: OperatorService,
private promptService: PromptService,
private pdfService: UserPdfExportService,
- private groupRepo: GroupRepositoryService
+ private groupRepo: GroupRepositoryService,
+ private sanitizer: DomSanitizer
) {
super(title, translate, matSnackBar);
// prevent 'undefined' to appear in the ui
@@ -394,4 +395,16 @@ export class UserDetailComponent extends BaseViewComponent implements OnInit {
public onDownloadPdf(): void {
this.pdfService.exportSingleUserAccessPDF(this.user);
}
+
+ /**
+ * Function to sanitize the text.
+ * Necessary to render text etc. correctly.
+ *
+ * @param text which should be sanitized.
+ *
+ * @returns safeHtml which can be displayed.
+ */
+ public sanitizedText(text: string): SafeHtml {
+ return this.sanitizer.bypassSecurityTrustHtml(text);
+ }
}
diff --git a/client/src/app/slides/topics/topic/topic-slide.component.html b/client/src/app/slides/topics/topic/topic-slide.component.html
index 1def91c3f..699f8b3c5 100644
--- a/client/src/app/slides/topics/topic/topic-slide.component.html
+++ b/client/src/app/slides/topics/topic/topic-slide.component.html
@@ -1,5 +1,5 @@
{{ data.data.title }}
-
+
diff --git a/client/src/app/slides/topics/topic/topic-slide.component.ts b/client/src/app/slides/topics/topic/topic-slide.component.ts
index 04b36c8a5..a232dfd65 100644
--- a/client/src/app/slides/topics/topic/topic-slide.component.ts
+++ b/client/src/app/slides/topics/topic/topic-slide.component.ts
@@ -1,6 +1,7 @@
import { Component } from '@angular/core';
import { BaseSlideComponent } from 'app/slides/base-slide-component';
import { TopicSlideData } from './topic-slide-data';
+import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Component({
selector: 'os-topic-slide',
@@ -8,7 +9,19 @@ import { TopicSlideData } from './topic-slide-data';
styleUrls: ['./topic-slide.component.scss']
})
export class TopicSlideComponent extends BaseSlideComponent
{
- public constructor() {
+ public constructor(private sanitizer: DomSanitizer) {
super();
}
+
+ /**
+ * Function to sanitize text.
+ * Necessary to render the text correctly.
+ *
+ * @param text which should be displayed.
+ *
+ * @returns safeHtml which can be displayed.
+ */
+ public sanitizedText(text: string): SafeHtml {
+ return this.sanitizer.bypassSecurityTrustHtml(text);
+ }
}