diff --git a/src/components/markdown/RemarkRenderer.tsx b/src/components/markdown/RemarkRenderer.tsx index 9501a66f..05025ff1 100644 --- a/src/components/markdown/RemarkRenderer.tsx +++ b/src/components/markdown/RemarkRenderer.tsx @@ -173,7 +173,12 @@ const Container = styled.div<{ largeEmoji: boolean }>` /** * Regex for matching execessive blockquotes */ -const RE_QUOTE = /(^[>\s][>\s])[>\s]+([^]+)$/gm; +const RE_QUOTE = /(^[>\s][>\s])[>\s]+([^]+$)/gm; + +/** + * Regex for matching open angled bracket + */ +const RE_OPEN_BRACKET = /\s][>\s])[>\s]+([^]+)$/gm; * @returns Sanitised string */ function sanitise(content: string) { - // Strip excessive blockquote indentation - return content.replace(RE_QUOTE, (_, m0, m1) => m0 + m1); + return ( + content + // Strip excessive blockquote indentation + .replace(RE_QUOTE, (_, m0, m1) => m0 + m1) + // Map < to HTML entity LT + // (otherwise all HTML is just obliterated, + // not even displayed as plain text) + .replace(RE_OPEN_BRACKET, "<") + ); } /** diff --git a/src/components/markdown/plugins/mentions.tsx b/src/components/markdown/plugins/mentions.tsx index 1411dcf5..917d8cda 100644 --- a/src/components/markdown/plugins/mentions.tsx +++ b/src/components/markdown/plugins/mentions.tsx @@ -12,6 +12,8 @@ const Mention = styled.a` align-items: center; display: inline-flex; + cursor: pointer; + font-weight: 600; background: var(--secondary-background); border-radius: calc(var(--border-radius) * 2);