Skip to content

Commit

Permalink
Don't allow links on embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Feb 2, 2024
1 parent 2cd108e commit b31e649
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/service/embed.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ export class EmbedService {
});
const links = el.querySelectorAll<HTMLAnchorElement>('a');
links.forEach(t => {
if (t.querySelectorAll('app-viewer').length) {
// TODO: allow image links?
while (t.firstChild) t.parentNode?.insertBefore(t.firstChild, t);
t.remove();
return;
}
const c = embed.createLink(t.href, t.innerText, t.title, t.className);
t.parentNode?.insertBefore(c.location.nativeElement, t);
t.remove();
Expand Down

0 comments on commit b31e649

Please sign in to comment.