From 74b30a5c81a79f67fd8ceccb8e20209175013d2f Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Mon, 21 Nov 2022 19:44:03 +0000 Subject: [PATCH] fixed escape characters in notify string --- scraping.go | 4 ++-- todo.md | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scraping.go b/scraping.go index 69f42c8..833ee1b 100644 --- a/scraping.go +++ b/scraping.go @@ -763,10 +763,10 @@ func notifyFilter(filters []Filter, filter *Filter, watch *Watch, web *Web, debu dataMap := make(map[string]any, 20) for _, f := range filters { - dataMap[f.Name] = html.UnescapeString(strings.Join(f.Results, ", ")) + dataMap[f.Name] = template.HTML(strings.Join(f.Results, ", ")) } - dataMap["Watch"] = watch + dataMap["WatchName"] = template.HTML(watch.Name) var buffer bytes.Buffer tmpl.Execute(&buffer, dataMap) diff --git a/todo.md b/todo.md index 2e887b9..a1662b9 100644 --- a/todo.md +++ b/todo.md @@ -1,6 +1,5 @@ # Todo - make generic 'notifier' interface - header/post body for get url ? -- unescape notify string - add lua filter - edit button on watch view page \ No newline at end of file