summaryrefslogtreecommitdiffstats
path: root/document.go
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2021-12-23 01:54:47 +0000
committerclsr <clsr@clsr.net>2021-12-23 02:51:49 +0000
commit43428e759d9fbc5a319c2b929bfb4469938cc386 (patch)
tree1ee452ff23249bf10653481599f8639aa46ceb25 /document.go
parent690a7183d7eca35b59e23e556b0c6492df08ffa5 (diff)
downloadcnm-go-0.4.2.tar.gz
cnm-go-0.4.2.zip
Add EscapeAll and escape all spaces in linksHEADv0.4.2master
Diffstat (limited to 'document.go')
-rw-r--r--document.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/document.go b/document.go
index 65eac3e..236782b 100644
--- a/document.go
+++ b/document.go
@@ -197,7 +197,7 @@ type Link struct {
// WriteIndent writes the link URL, name and description indented by n tabs.
func (link Link) WriteIndent(w io.Writer, n int) error {
- s := Escape(link.URL)
+ s := EscapeAll(link.URL)
if link.Name != "" {
s += " " + Escape(link.Name)
}
@@ -226,7 +226,7 @@ type Site struct {
// WriteIndent writes the sitemap indented by n tabs.
func (site Site) WriteIndent(w io.Writer, n int) error {
- s := Escape(site.Path)
+ s := EscapeAll(site.Path)
if site.Name != "" {
s += " " + Escape(site.Name)
}