Skip to content

Add support for custom anchor element attributes to fmt_url() #1428

Closed
@elipousson

Description

@elipousson

Prework

Proposal

I recently realized that the fmt_url() function does not allow custom attribute values and has the target attribute hard-coded as "_blank". Adding support for custom attributes to the fmt_url() function would add greater flexibility how the links are created. Support for other custom attributes including hreflang, ping, referrerpolicy, rel, and type could be added at the same time.

I used the documentation on the supported attributes for anchor elements ("") from the mdn developer docs as a reference in setting up the validation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions