From 43428e759d9fbc5a319c2b929bfb4469938cc386 Mon Sep 17 00:00:00 2001 From: clsr Date: Thu, 23 Dec 2021 01:54:47 +0000 Subject: Add EscapeAll and escape all spaces in links --- document.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'document.go') 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) } -- cgit