Allow matrix scheme
This commit is contained in:
parent
eef5cbbace
commit
dbce6285d9
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ import { linkify } from "./linkify/linkify.js";
|
||||||
*/
|
*/
|
||||||
const basicInline = ["EM", "STRONG", "CODE", "DEL", "SPAN" ];
|
const basicInline = ["EM", "STRONG", "CODE", "DEL", "SPAN" ];
|
||||||
const basicBlock = ["DIV", "BLOCKQUOTE"];
|
const basicBlock = ["DIV", "BLOCKQUOTE"];
|
||||||
const safeSchemas = ["https", "http", "ftp", "mailto", "magnet"].map(name => `${name}://`);
|
const safeSchemas = ["matrix", "https", "http", "ftp", "mailto", "magnet"].map(name => `${name}:`);
|
||||||
const baseUrl = 'https://matrix.to';
|
const baseUrl = 'https://matrix.to';
|
||||||
const linkPrefix = `${baseUrl}/#/`;
|
const linkPrefix = `${baseUrl}/#/`;
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class HTMLParseResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
const sanitizeConfig = {
|
const sanitizeConfig = {
|
||||||
ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|xxx|mxc):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i,
|
ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|xxx|mxc|matrix):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i,
|
||||||
ADD_TAGS: ['mx-reply']
|
ADD_TAGS: ['mx-reply']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue