diff --git a/src/components/markdown-renderer/markdown-extension/blockquote/blockquote-extra-tag-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/blockquote/blockquote-extra-tag-markdown-extension.ts index 271be3572..b404e2cd9 100644 --- a/src/components/markdown-renderer/markdown-extension/blockquote/blockquote-extra-tag-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/blockquote/blockquote-extra-tag-markdown-extension.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ @@ -33,7 +33,7 @@ export class BlockquoteExtraTagMarkdownExtension extends MarkdownExtension { return [new BlockquoteBorderColorNodePreprocessor()] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [BlockquoteExtraTagMarkdownExtension.tagName] } } diff --git a/src/components/markdown-renderer/markdown-extension/gist/gist-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/gist/gist-markdown-extension.ts index 0a7cbacf9..56042c13a 100644 --- a/src/components/markdown-renderer/markdown-extension/gist/gist-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/gist/gist-markdown-extension.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ @@ -28,7 +28,7 @@ export class GistMarkdownExtension extends MarkdownExtension { return [new CustomTagWithIdComponentReplacer(GistFrame, GistMarkdownExtension.tagName)] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [GistMarkdownExtension.tagName] } } diff --git a/src/components/markdown-renderer/markdown-extension/iframe-capsule/iframe-capsule-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/iframe-capsule/iframe-capsule-markdown-extension.ts index 23bcd8a5d..efcbe42ae 100644 --- a/src/components/markdown-renderer/markdown-extension/iframe-capsule/iframe-capsule-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/iframe-capsule/iframe-capsule-markdown-extension.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ @@ -16,7 +16,7 @@ export class IframeCapsuleMarkdownExtension extends MarkdownExtension { return [new IframeCapsuleReplacer()] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return ['iframe'] } } diff --git a/src/components/markdown-renderer/markdown-extension/katex/katex-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/katex/katex-markdown-extension.ts index 851f686a8..c00e369e3 100644 --- a/src/components/markdown-renderer/markdown-extension/katex/katex-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/katex/katex-markdown-extension.ts @@ -33,7 +33,7 @@ export class KatexMarkdownExtension extends MarkdownExtension { return [new KatexReplacer()] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [KatexMarkdownExtension.tagName] } } diff --git a/src/components/markdown-renderer/markdown-extension/linemarker/linemarker-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/linemarker/linemarker-markdown-extension.ts index 07f524820..e139824a4 100644 --- a/src/components/markdown-renderer/markdown-extension/linemarker/linemarker-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/linemarker/linemarker-markdown-extension.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ @@ -29,7 +29,7 @@ export class LinemarkerMarkdownExtension extends MarkdownExtension { return [new LinemarkerReplacer()] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [LinemarkerMarkdownExtension.tagName] } } diff --git a/src/components/markdown-renderer/markdown-extension/markdown-extension-collection.ts b/src/components/markdown-renderer/markdown-extension/markdown-extension-collection.ts index b99ab5fd0..cf7d3969b 100644 --- a/src/components/markdown-renderer/markdown-extension/markdown-extension-collection.ts +++ b/src/components/markdown-renderer/markdown-extension/markdown-extension-collection.ts @@ -17,7 +17,7 @@ export class MarkdownExtensionCollection { private extensions: MarkdownExtension[] public constructor(additionalExtensions: MarkdownExtension[]) { - const tagWhiteLists = additionalExtensions.flatMap((extension) => extension.buildTagNameWhitelist()) + const tagWhiteLists = additionalExtensions.flatMap((extension) => extension.buildTagNameAllowList()) this.extensions = [...additionalExtensions, new SanitizerMarkdownExtension(tagWhiteLists)] } diff --git a/src/components/markdown-renderer/markdown-extension/markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/markdown-extension.ts index 85149bd6d..0663ee548 100644 --- a/src/components/markdown-renderer/markdown-extension/markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/markdown-extension.ts @@ -31,7 +31,7 @@ export abstract class MarkdownExtension { return [] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [] } diff --git a/src/components/markdown-renderer/markdown-extension/plantuml/plantuml-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/plantuml/plantuml-markdown-extension.ts index 64e732649..ce5c22ebf 100644 --- a/src/components/markdown-renderer/markdown-extension/plantuml/plantuml-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/plantuml/plantuml-markdown-extension.ts @@ -46,7 +46,7 @@ export class PlantumlMarkdownExtension extends MarkdownExtension { .orElseGet(() => this.plantumlError(markdownIt)) } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return ['plantuml-not-configured'] } diff --git a/src/components/markdown-renderer/markdown-extension/vimeo/vimeo-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/vimeo/vimeo-markdown-extension.ts index 6b6efd7ee..e0d96a676 100644 --- a/src/components/markdown-renderer/markdown-extension/vimeo/vimeo-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/vimeo/vimeo-markdown-extension.ts @@ -30,7 +30,7 @@ export class VimeoMarkdownExtension extends MarkdownExtension { return [new CustomTagWithIdComponentReplacer(VimeoFrame, VimeoMarkdownExtension.tagName)] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [VimeoMarkdownExtension.tagName] } diff --git a/src/components/markdown-renderer/markdown-extension/youtube/youtube-markdown-extension.ts b/src/components/markdown-renderer/markdown-extension/youtube/youtube-markdown-extension.ts index f619c7c7f..e2eac2c10 100644 --- a/src/components/markdown-renderer/markdown-extension/youtube/youtube-markdown-extension.ts +++ b/src/components/markdown-renderer/markdown-extension/youtube/youtube-markdown-extension.ts @@ -30,7 +30,7 @@ export class YoutubeMarkdownExtension extends MarkdownExtension { return [new CustomTagWithIdComponentReplacer(YouTubeFrame, YoutubeMarkdownExtension.tagName)] } - public buildTagNameWhitelist(): string[] { + public buildTagNameAllowList(): string[] { return [YoutubeMarkdownExtension.tagName] }