mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
Stop propagation on markdown url click
This commit is contained in:
parent
3f35d615c0
commit
fe881b001d
@ -48,8 +48,8 @@ class Utils {
|
||||
static htmlFromMarkdown(text: string): string {
|
||||
// HACKHACK: Somehow, marked doesn't encode angle brackets
|
||||
const renderer = new marked.Renderer()
|
||||
renderer.link = ( href, title, text ) => `<a target="_blank" href="${ href }" title="${ title || '' }">${ text }</a>`
|
||||
const html = marked(text.replace(/</g, '<'), { renderer })
|
||||
renderer.link = (href, title, contents) => `<a target="_blank" href="${href}" title="${title || ''}" onclick="event.stopPropagation();">${contents}</a>`
|
||||
const html = marked(text.replace(/</g, '<'), {renderer})
|
||||
return html
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user