Skip to content

Commit

Permalink
Add new and backup href and target
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwjackson committed Dec 29, 2024
1 parent 8abc5e8 commit 402cc44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/mermaid/src/diagrams/sequence/svgDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ export const drawKatex = async function (elem, textData, msgModel = null) {
};

export const drawLink = function (elem, label, url) {
const sanitizedUrl = sanitizeUrl(url);
elem
.append('a')
.attr('xlink:href', sanitizeUrl(url))
.attr('xlink:show', 'new')
.attr('href', sanitizedUrl)
.attr('xlink:href', sanitizedUrl)
.attr('target', '_blank')
.attr('xlink:show', 'new')
.attr('rel', 'noopener noreferrer')
.append('tspan')
.attr('class', 'link')
Expand Down

0 comments on commit 402cc44

Please sign in to comment.