frp/pkg/config
Michael Hanselmann 8a0fd2acd5 Use text/template instead of html/template for config pre-processing
Commit c95311d1 added support for multiple config formats in addition to
pre-processing using Go's built-in templating system. The
`html/template` package is equivalent to `text/template`, except that
the former automatically escapes characters for inclusion in HTML.

Configurations aren't plain text, but they're also certainly no HTML.
The difference between the packages is noticeable when using `printf
"%q"` for quoting of strings. An example from the included unittest:

* `html/template`: `key = "with space"`
* `text/template`: `key = "with space"`

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2025-02-04 22:30:05 +01:00
..
legacy client, pkg, server, test: replaced 'interface{}' with 'any' (#4611) 2025-01-02 11:24:08 +08:00
types use go1.23 (#4495) 2024-10-17 17:22:41 +08:00
v1 client plugin: added plugin tls2raw (#4341) 2024-07-25 14:28:17 +08:00
flags.go frpc: support metadatas and annotations in frpc proxy commands (#4623) 2025-01-06 14:22:57 +08:00
load_test.go Use text/template instead of html/template for config pre-processing 2025-02-04 22:30:05 +01:00
load.go Use text/template instead of html/template for config pre-processing 2025-02-04 22:30:05 +01:00
template.go support range ports mapping by go template (#4073) 2024-03-15 17:23:16 +08:00