google / google/safehtml

empty safehtml.HTML is true, should be false

Open
#2 3 comments 0 reactions 0 assignees View on GitHub
bug documentation
Dominant language
Go
Stars
380
Forks
23
PR merge metrics
No merged PRs in 30d

Description

There is an incompatibility with html/template. The empty escaped template value `template.HTML("")` is false an in `if`, just as the empty string is. But the zero value `safehtml.HTML{}` is true.

See https://play.golang.org/p/iKB2uBICUX-.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.