mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 08:38:37 +00:00
Handle subdomains on URLs
This commit is contained in:
@@ -172,7 +172,7 @@ export default function Renderer({ content, disallowBigEmoji }: MarkdownProps) {
|
|||||||
try {
|
try {
|
||||||
const url = new URL(href, location.href);
|
const url = new URL(href, location.href);
|
||||||
|
|
||||||
if (url.hostname === location.hostname) {
|
if (url.hostname.replace(/^[^.]+\./g, "") === location.hostname.replace(/^[^.]+\./g, "")) {
|
||||||
internal = true;
|
internal = true;
|
||||||
element.addEventListener(
|
element.addEventListener(
|
||||||
"click",
|
"click",
|
||||||
|
|||||||
Reference in New Issue
Block a user