Skip to content

Whitelisting rel properties #223

Description

@Odonno

Is your feature request related to a problem? Please describe.

When sanitized, the rel property on links is completely replaced by the noopener noreferrer value, even though a correct value.

Describe the solution you'd like

Set a constant list of correct values that won't be replaced after sanitization. e.g.

const POSSIBLE_REL_VALUES = ["nofollow", "ugc", "sponsored", ...];

The list of possible values can be found here https://www.iana.org/assignments/link-relations/link-relations.xhtml

Describe alternatives you've considered

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions