Skip to content

recent versions don't set empty tag values any more #1089

@david-its

Description

@david-its

It is important to set empty tag values sometimes:

  • e.g. for download links to open one has to set download=""
  • for Tab pages to be openable by right click in another browser Tab <a> element should have an empty href="" value. Otherwise Chrome won't even show "Open Link in New Tab/Window" menu items.

however, in recent versions there was a change in pkg/app/attribute.go:

func (a attributes) Set(name string, value any) {
...
        if v != "" {
                a[name] = v
        }
}

which broke old behavior.
can we revert it back please? i don't think it's good idea to list here all the possible exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions