diff --git a/shared/editor/nodes/Embed.tsx b/shared/editor/nodes/Embed.tsx index 4ed1f57fc2..e42ee8cf4b 100644 --- a/shared/editor/nodes/Embed.tsx +++ b/shared/editor/nodes/Embed.tsx @@ -127,12 +127,11 @@ export default class Embed extends Node { if (!state.inTable) { state.ensureNewLine(); } + + const href = node.attrs.href.replace(/_/g, "%5F"); + state.write( - "[" + - state.esc(node.attrs.href, false) + - "](" + - state.esc(node.attrs.href, false) + - ")" + "[" + state.esc(href, false) + "](" + state.esc(href, false) + ")" ); if (!state.inTable) { state.write("\n\n");