mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 12:37:22 +01:00
Allow matrix scheme
This commit is contained in:
parent
eef5cbbace
commit
dbce6285d9
@ -29,7 +29,7 @@ import { linkify } from "./linkify/linkify.js";
|
||||
*/
|
||||
const basicInline = ["EM", "STRONG", "CODE", "DEL", "SPAN" ];
|
||||
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 linkPrefix = `${baseUrl}/#/`;
|
||||
|
||||
|
@ -55,7 +55,7 @@ class HTMLParseResult {
|
||||
}
|
||||
|
||||
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']
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user