diff --git a/client/web/plugins/com.msgbyte.bbcode/src/tags/UrlTag.tsx b/client/web/plugins/com.msgbyte.bbcode/src/tags/UrlTag.tsx index 1f17b7a6..591c92b3 100644 --- a/client/web/plugins/com.msgbyte.bbcode/src/tags/UrlTag.tsx +++ b/client/web/plugins/com.msgbyte.bbcode/src/tags/UrlTag.tsx @@ -7,11 +7,16 @@ export const UrlTag: React.FC = React.memo((props) => { const text = node.content.join(''); const url = node.attrs.url ?? text; - if (url.startsWith('/') || url.startsWith(window.location.origin)) { + if (url.startsWith('/')) { // 内部地址,使用 react-router 进行导航 return {text}; } + if (url.startsWith(window.location.origin)) { + // 内部地址,使用 react-router 进行导航 + return {text}; + } + return ( {text}