@rws-framework/client 2.18.12 → 2.18.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/client",
3
3
  "private": false,
4
- "version": "2.18.12",
4
+ "version": "2.18.13",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
7
7
  "docs": "typedoc --tsconfig ./tsconfig.json"
@@ -1,4 +1,6 @@
1
- import { RWSView, RWSViewComponent, observable, attr } from '../../../index';
1
+ import { RWSViewComponent } from '../../../components/_component';
2
+ import { RWSView } from '../../../components/_decorator';
3
+ import { observable, attr } from '@microsoft/fast-element';
2
4
 
3
5
  import { ViewTemplate } from '@microsoft/fast-element';
4
6
 
@@ -18,7 +20,7 @@ class LineSplitter extends RWSViewComponent {
18
20
  {
19
21
  const componentAllowedTags: string[] = this.allowedHTMLTags.concat(this.allowedTags.split(','));
20
22
 
21
- let output = this.domService.sanitizeHTML(line, { ADD_TAGS: componentAllowedTags });
23
+ let output = this.domService.sanitizeHTML(line, { ADD_TAGS: [], ALLOWED_TAGS: componentAllowedTags });
22
24
 
23
25
  output = output.replace(/<.*>([\s\S]*?)<\/.*>/g, (match: string) => {
24
26
  return match.replace(/\n/g, '');
@@ -80,11 +80,10 @@ class DOMService extends RWSService {
80
80
 
81
81
  sanitizeHTML(
82
82
  line: string,
83
- sanitizeOptions: DOMPurify.Config = {})
83
+ sanitizeOptions: DOMPurify.Config = { })
84
84
  {
85
85
  const output: string = line.trim();
86
- const sanitized = DOMPurify.sanitize(output, sanitizeOptions);
87
-
86
+ const sanitized = DOMPurify.sanitize(output, { USE_PROFILES: { html: true }, ...sanitizeOptions});
88
87
  return sanitized;
89
88
  }
90
89
  }