diff --git a/src/index.scss b/src/index.scss index a529b0c3..3dbbfc94 100644 --- a/src/index.scss +++ b/src/index.scss @@ -389,6 +389,9 @@ body { a { color: var(--tc-link); text-decoration: none; + &:hover { + text-decoration: underline; + } } b { font-weight: var(--fw-medium); diff --git a/src/util/twemojify.js b/src/util/twemojify.js index 43943bac..bcef5869 100644 --- a/src/util/twemojify.js +++ b/src/util/twemojify.js @@ -13,9 +13,17 @@ import { sanitizeText } from './sanitize'; */ export function twemojify(text, opts, linkify = false, sanitize = true) { if (typeof text !== 'string') return text; - let content = sanitize ? twemoji.parse(sanitizeText(text), opts) : twemoji.parse(text, opts); + let content = text; + + if (sanitize) { + content = sanitizeText(content); + } + content = twemoji.parse(content, opts); if (linkify) { - content = linkifyHtml(content, { target: '_blank', rel: 'noreferrer noopener' }); + content = linkifyHtml(content, { + target: '_blank', + rel: 'noreferrer noopener', + }); } return parse(content); }