mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #4656] [MERGED] Use text/template instead of html/template for config pre-processing #5019
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5019
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/4656
Author: @hansmi
Created: 2/4/2025
Status: ✅ Merged
Merged: 2/7/2025
Merged by: @fatedier
Base:
dev← Head:template1📝 Commits (1)
8a0fd2aUse text/template instead of html/template for config pre-processing📊 Changes
2 files changed (+24 additions, -1 deletions)
View changed files
📝
pkg/config/load.go(+1 -1)📝
pkg/config/load_test.go(+23 -0)📄 Description
Commit
c95311d1added support for multiple config formats in addition to pre-processing using Go's built-in templating system. Thehtml/templatepackage is equivalent totext/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"🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.