Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two <a> tags, one inside another, when adding manual link decorator with target attribute #8230

Closed
FilipTokarski opened this issue Oct 8, 2020 · 1 comment
Labels
package:link resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@FilipTokarski
Copy link
Member

FilipTokarski commented Oct 8, 2020

📝 Provide detailed reproduction steps (if any)

  1. Set the following link options:
link: {
    addTargetToExternalLinks: true,
    decorators: {
        isExternal: {
            mode: 'manual',
            label: 'is top',
            attributes: {
                target: '_top'
            }
        }
    }
}
  1. Add link with manual decorator to some text

✔️ Expected result

There is only one <a> tag.

❌ Actual result

There are two <a> tags, one inside another, with different target attributes:

<p>Some <a target="_blank" rel="noopener noreferrer" href="https://www.google.com"><a target="_top">sample</a></a> text</p>

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@FilipTokarski FilipTokarski added type:bug This issue reports a buggy (incorrect) behavior. package:link squad:core Issue to be handled by the Core team. labels Oct 8, 2020
@Reinmar
Copy link
Member

Reinmar commented Oct 12, 2020

Yeah, it's the same story as in #6436. A limitation that may not be easy to remove.

I'll close this as a DUP of #6436.

@Reinmar Reinmar closed this as completed Oct 12, 2020
@Reinmar Reinmar added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:link resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants