Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Support mailto for custom markup

Chocobozzza4927884b224
diff --git a/client/src/app/core/renderer/markdown.service.ts b/client/src/app/core/renderer/markdown.service.ts
index a5fd728629..dd23a1b01b 100644
--- a/client/src/app/core/renderer/markdown.service.ts
+++ b/client/src/app/core/renderer/markdown.service.ts
@@ -64,8 +64,8 @@ export class MarkdownService {
textMarkdownToHTML (options: {
markdown: string
- withHtml?: boolean
- withEmoji?: boolean
+ withHtml?: boolean // default false
+ withEmoji?: boolean // default false
}) {
const { markdown, withHtml = false, withEmoji = false } = options
@@ -76,8 +76,8 @@ export class MarkdownService {
enhancedMarkdownToHTML (options: {
markdown: string
- withHtml?: boolean
- withEmoji?: boolean
+ withHtml?: boolean // default false
+ withEmoji?: boolean // default false
}) {
const { markdown, withHtml = false, withEmoji = false } = options
@@ -99,6 +99,8 @@ export class MarkdownService {
return this.render({ name: 'customPageMarkdownIt', markdown, withEmoji: true, additionalAllowedTags })
}
+ // ---------------------------------------------------------------------------
+
processVideoTimestamps (videoShortUUID: string, html: string) {
return html.replace(/((\d{1,2}):)?(\d{1,2}):(\d{1,2})/g, function (str, _, h, m, s) {
const t = (3600 * +(h || 0)) + (60 * +(m || 0)) + (+(s || 0))
diff --git a/shared/core-utils/renderer/html.ts b/shared/core-utils/renderer/html.ts
index 5023089793..877f2ec550 100644
--- a/shared/core-utils/renderer/html.ts
+++ b/shared/core-utils/renderer/html.ts
@@ -38,7 +38,11 @@ export function getCustomMarkupSanitizeOptions (additionalAllowedTags: string[]
...additionalAllowedTags,
'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'
],
- allowedSchemes: base.allowedSchemes,
+ allowedSchemes: [
+ ...base.allowedSchemes,
+
+ 'mailto'
+ ],
allowedAttributes: {
...base.allowedAttributes,