Skip to content

Create template function to remove non-printable characters #11255

@Winterhuman

Description

@Winterhuman

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.112.3+extended linux/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes.

Issue description

As far as I can tell, no combination of plainify, safeHTML, markdownify, or html{Une,E}scape can fully remove soft hyphens, and at best converts them to \uad, the only exception I found being anchorize which does successfully remove them.

I'm not sure which functions out of the above should be able to remove soft hyphens or not (my guess would be plainify, since it's meant to "strip HTML tags"), but for now, using replace .Var "­" "" is the only way other than anchorize that I've found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions