diff options
-rw-r--r-- | client/src/app/shared/shared-main/misc/help.component.ts | 6 | ||||
-rw-r--r-- | shared/core-utils/renderer/html.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-main/misc/help.component.ts b/client/src/app/shared/shared-main/misc/help.component.ts index 9647e05bd..76e255d99 100644 --- a/client/src/app/shared/shared-main/misc/help.component.ts +++ b/client/src/app/shared/shared-main/misc/help.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core' | 1 | import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core' |
2 | import { MarkdownService } from '@app/core' | ||
3 | import { GlobalIconName } from '@app/shared/shared-icons' | 2 | import { GlobalIconName } from '@app/shared/shared-icons' |
3 | import { ENHANCED_RULES, TEXT_RULES } from '@shared/core-utils/renderer/markdown' | ||
4 | import { PeerTubeTemplateDirective } from '../angular' | 4 | import { PeerTubeTemplateDirective } from '../angular' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
@@ -60,12 +60,12 @@ export class HelpComponent implements OnInit, OnChanges, AfterContentInit { | |||
60 | 60 | ||
61 | private init () { | 61 | private init () { |
62 | if (this.helpType === 'markdownText') { | 62 | if (this.helpType === 'markdownText') { |
63 | this.mainHtml = this.formatMarkdownSupport(MarkdownService.TEXT_RULES) | 63 | this.mainHtml = this.formatMarkdownSupport(TEXT_RULES) |
64 | return | 64 | return |
65 | } | 65 | } |
66 | 66 | ||
67 | if (this.helpType === 'markdownEnhanced') { | 67 | if (this.helpType === 'markdownEnhanced') { |
68 | this.mainHtml = this.formatMarkdownSupport(MarkdownService.ENHANCED_RULES) | 68 | this.mainHtml = this.formatMarkdownSupport(ENHANCED_RULES) |
69 | return | 69 | return |
70 | } | 70 | } |
71 | } | 71 | } |
diff --git a/shared/core-utils/renderer/html.ts b/shared/core-utils/renderer/html.ts index 37ae5147c..1220848a0 100644 --- a/shared/core-utils/renderer/html.ts +++ b/shared/core-utils/renderer/html.ts | |||
@@ -5,7 +5,7 @@ export const SANITIZE_OPTIONS = { | |||
5 | a: [ 'href', 'class', 'target', 'rel' ] | 5 | a: [ 'href', 'class', 'target', 'rel' ] |
6 | }, | 6 | }, |
7 | transformTags: { | 7 | transformTags: { |
8 | a: (tagName, attribs) => { | 8 | a: (tagName: string, attribs: any) => { |
9 | let rel = 'noopener noreferrer' | 9 | let rel = 'noopener noreferrer' |
10 | if (attribs.rel === 'me') rel += ' me' | 10 | if (attribs.rel === 'me') rel += ' me' |
11 | 11 | ||