NewImmutableSafeURL returns an ImmutableSafeURL that renders url verbatim. Only pass a URL you built yourself from trusted components or received from a trusted source, such as a server response; this bypasses all percent-encoding, so passing a value that embeds unescaped user or third party input r
(url string)
| 118 | // that embeds unescaped user or third party input reintroduces the injection risk that |
| 119 | // SafeURL exists to prevent. |
| 120 | func NewImmutableSafeURL(url string) *ImmutableSafeURL { |
| 121 | return &ImmutableSafeURL{url: url} |
| 122 | } |
| 123 | |
| 124 | func (u *ImmutableSafeURL) sealed() {} |
| 125 |
no outgoing calls