Handle subdomains on URLs

ui/bot-profile
Jamie 2021-08-22 03:39:30 -07:00 committed by GitHub
parent db43c02e01
commit 5c01944cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ export default function Renderer({ content, disallowBigEmoji }: MarkdownProps) {
try {
const url = new URL(href, location.href);
if (url.hostname === location.hostname) {
if (url.hostname.replace(/^[^.]+\./g, "") === location.hostname.replace(/^[^.]+\./g, "")) {
internal = true;
element.addEventListener(
"click",