blob: c9fa2de1da3f79e93942aba0325f1e71d32a756b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (c) 2017 The Go Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
package template
import (
"github.com/google/safehtml/internal/template/raw"
)
// The following functions are used by package uncheckedconversions
// (via package raw) to create TrustedSource and TrustedTemplate values
// from plain strings.
func trustedSourceRaw(s string) TrustedSource {
return TrustedSource{s}
}
func trustedTemplateRaw(s string) TrustedTemplate {
return TrustedTemplate{s}
}
func init() {
raw.TrustedSource = trustedSourceRaw
raw.TrustedTemplate = trustedTemplateRaw
}
|