You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for safe identifiers says "alphanumeric" characters are allowed, but the implementation supports only ASCII letters and numbers. Unless there are security issues with Unicode characters, they should be supported.
Motivation: documentation sites that want to use language identifiers as (part of) fragments for easy navigation, e.g. https://pkg.go.dev.
The change I'm suggesting would be from
var onlyAlphanumericsOrHyphenPattern = regexp.MustCompile(`^[-_a-zA-Z0-9]*$`)
Convert almost all of the remainder of the dochtml package to use
safehtml. (There is still a case with comments that needs to be
dealt with.)
This requires using legacy conversions to generate
safehtml.Identifiers from Go symbols and dotted expressions,
since they contain characters that are not permitted in safehtml.Identifiers.
I filed google/safehtml#4 and
google/safehtml#5 to get those characters
allowed.
Change-Id: Ic1b821680a6cb5dfae445a87cd305ae02cd78493
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/242818
Reviewed-by: Julie Qiu <julie@golang.org>
The documentation for safe identifiers says "alphanumeric" characters are allowed, but the implementation supports only ASCII letters and numbers. Unless there are security issues with Unicode characters, they should be supported.
Motivation: documentation sites that want to use language identifiers as (part of) fragments for easy navigation, e.g. https://pkg.go.dev.
The change I'm suggesting would be from
(https://github.com/google/safehtml/blob/v0.0.2/identifier.go#L49)
to
The text was updated successfully, but these errors were encountered: