Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix internal link detection

Chocobozzz045e6af1d52f
diff --git a/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts b/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts
index 36d05766b6..954f902894 100644
--- a/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts
+++ b/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts
@@ -43,7 +43,7 @@ export class PluginPagesComponent implements OnDestroy, AfterViewInit {
// Get the href attribute set by the dev, not the one calculated by JS to detect if it's a relative/external link
const href = a.getAttribute('href')
- if (a.target !== '_blank' && !href.match(/^https?:\/\//)) {
+ if (a.target !== '_blank' && !href.startsWith('/')) {
event.preventDefault()
event.stopPropagation()