1
0
Fork 0

Fix client build

This commit is contained in:
Chocobozzz 2020-11-17 14:49:36 +01:00
parent 45c70083dd
commit 47dc5db9c3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core' import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core'
import { MarkdownService } from '@app/core'
import { GlobalIconName } from '@app/shared/shared-icons' import { GlobalIconName } from '@app/shared/shared-icons'
import { ENHANCED_RULES, TEXT_RULES } from '@shared/core-utils/renderer/markdown'
import { PeerTubeTemplateDirective } from '../angular' import { PeerTubeTemplateDirective } from '../angular'
@Component({ @Component({
@ -60,12 +60,12 @@ export class HelpComponent implements OnInit, OnChanges, AfterContentInit {
private init () { private init () {
if (this.helpType === 'markdownText') { if (this.helpType === 'markdownText') {
this.mainHtml = this.formatMarkdownSupport(MarkdownService.TEXT_RULES) this.mainHtml = this.formatMarkdownSupport(TEXT_RULES)
return return
} }
if (this.helpType === 'markdownEnhanced') { if (this.helpType === 'markdownEnhanced') {
this.mainHtml = this.formatMarkdownSupport(MarkdownService.ENHANCED_RULES) this.mainHtml = this.formatMarkdownSupport(ENHANCED_RULES)
return return
} }
} }

View file

@ -5,7 +5,7 @@ export const SANITIZE_OPTIONS = {
a: [ 'href', 'class', 'target', 'rel' ] a: [ 'href', 'class', 'target', 'rel' ]
}, },
transformTags: { transformTags: {
a: (tagName, attribs) => { a: (tagName: string, attribs: any) => {
let rel = 'noopener noreferrer' let rel = 'noopener noreferrer'
if (attribs.rel === 'me') rel += ' me' if (attribs.rel === 'me') rel += ' me'