- {{::projectController.getNodePositionById(group.$key)}}:
- {{::projectController.getNodeTitleByNodeId(group.$key)}}
+ {{::chooseStructureLocationController.getNodePositionById(group.$key)}}:
+ {{::chooseStructureLocationController.getNodeTitleByNodeId(group.$key)}}
diff --git a/src/assets/wise5/authoringTool/structure/chooseStructureLocationController.ts b/src/assets/wise5/authoringTool/structure/chooseStructureLocationController.ts
index 89db2ff52b..870a857402 100644
--- a/src/assets/wise5/authoringTool/structure/chooseStructureLocationController.ts
+++ b/src/assets/wise5/authoringTool/structure/chooseStructureLocationController.ts
@@ -96,6 +96,14 @@ class ChooseStructureLocationController {
});
}
+ getNodeTitleByNodeId(nodeId: string): string {
+ return this.ProjectService.getNodeTitleByNodeId(nodeId);
+ }
+
+ getNodePositionById(nodeId: string): string {
+ return this.ProjectService.getNodePositionById(nodeId);
+ }
+
cancel() {
this.$state.go('root.at.project');
}
diff --git a/src/assets/wise5/components/html/html-student/html-student.component.ts b/src/assets/wise5/components/html/html-student/html-student.component.ts
index aa632b8648..985adae66f 100644
--- a/src/assets/wise5/components/html/html-student/html-student.component.ts
+++ b/src/assets/wise5/components/html/html-student/html-student.component.ts
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
+import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import { NodeService } from '../../../services/nodeService';
import { UtilService } from '../../../services/utilService';
import { ComponentStudent } from '../../component-student.component';
@@ -8,15 +9,21 @@ import { ComponentStudent } from '../../component-student.component';
templateUrl: 'html-student.component.html'
})
export class HtmlStudent extends ComponentStudent {
- html: string = '';
+ html: SafeHtml = '';
- constructor(protected NodeService: NodeService, protected UtilService: UtilService) {
+ constructor(
+ protected NodeService: NodeService,
+ private sanitizer: DomSanitizer,
+ protected UtilService: UtilService
+ ) {
super(NodeService);
}
ngOnInit() {
super.ngOnInit();
- this.html = this.UtilService.replaceWISELinks(this.componentContent.html);
+ this.html = this.sanitizer.bypassSecurityTrustHtml(
+ this.UtilService.replaceWISELinks(this.componentContent.html)
+ );
this.broadcastDoneRenderingComponent();
}
}