aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-10-10 17:34:54 -0400
committertdro <tdro@noreply.example.com>2022-10-10 17:34:54 -0400
commit48bac198206fb02e831f1ed982976e8115f076b4 (patch)
treef51dab636021c8643f200c629f0811a5406a4d85
parent9bbb5664523fb8ba41acaf894ce136803c8b25f5 (diff)
downloadcanory-48bac198206fb02e831f1ed982976e8115f076b4.tar.gz
canory-48bac198206fb02e831f1ed982976e8115f076b4.tar.bz2
canory-48bac198206fb02e831f1ed982976e8115f076b4.zip
themes/default/layouts/partials/generate-feeds: Plainify to html first
Seems to be better at filtering out html.
-rw-r--r--themes/default/layouts/partials/generate-feeds.html36
1 files changed, 18 insertions, 18 deletions
diff --git a/themes/default/layouts/partials/generate-feeds.html b/themes/default/layouts/partials/generate-feeds.html
index aec232f..cb53e17 100644
--- a/themes/default/layouts/partials/generate-feeds.html
+++ b/themes/default/layouts/partials/generate-feeds.html
@@ -133,7 +133,7 @@
{{- end -}}
- {{- $sourceDomain := ($sourceLink | plainify | htmlUnescape | urls.Parse).Host -}}
+ {{- $sourceDomain := ($sourceLink | plainify | html | htmlUnescape | urls.Parse).Host -}}
{{- /* Replace invalid time zones. */ -}}
{{- $date = replaceRE "G[0-9]+T" "UTC" $date -}}
@@ -155,23 +155,23 @@
{{-
$feeds = $feeds | append (dict
- "FeedContent" ($content | plainify | htmlUnescape)
- "FeedContentShort" (delimit (first 2 (split ($content | plainify | htmlUnescape) "\n")) " " | truncate 250)
- "FeedDate" ($date | plainify | htmlUnescape | time.Format "January 2, 2006")
- "FeedDateTime" ($date | plainify | htmlUnescape | time.Format "2006-01-02T15:04:05Z")
- "FeedDateTitle" ($date | plainify | htmlUnescape | time.Format "Monday, January 2 2006 at 15:04:05 MST")
- "FeedDescription" ($description | plainify | htmlUnescape)
- "FeedDescriptionShort" (delimit (first 2 (split ($description | plainify | htmlUnescape) "\n")) " " | truncate 250)
- "FeedEnclosure" ($enclosure | plainify | htmlUnescape)
- "FeedImageLink" ($imageLink | plainify | htmlUnescape)
- "FeedLink" ($link | plainify | htmlUnescape)
- "FeedName" (delimit ((delimit (first 2 (split ($sourceTitle | plainify | htmlUnescape) " ")) " ") | findRE "^([^.|?|!|\n|\"|]+)") " " | replaceRE "[^a-zA-Z ]" "")
- "FeedSourceDescription" ($sourceDescription | plainify | htmlUnescape)
- "FeedSourceDomain" ($sourceDomain | plainify | htmlUnescape)
- "FeedSourceLink" ($sourceLink | plainify | htmlUnescape)
- "FeedSourceHome" ($sourceHome | plainify | htmlUnescape)
- "FeedSourceTitle" ($sourceTitle | plainify | htmlUnescape)
- "FeedTitle" ($title | plainify | htmlUnescape)
+ "FeedContent" ($content | plainify | html | htmlUnescape)
+ "FeedContentShort" (delimit (first 2 (split ($content | plainify | html | htmlUnescape) "\n")) " " | truncate 250)
+ "FeedDate" ($date | plainify | html | htmlUnescape | time.Format "January 2, 2006")
+ "FeedDateTime" ($date | plainify | html | htmlUnescape | time.Format "2006-01-02T15:04:05Z")
+ "FeedDateTitle" ($date | plainify | html | htmlUnescape | time.Format "Monday, January 2 2006 at 15:04:05 MST")
+ "FeedDescription" ($description | plainify | html | htmlUnescape)
+ "FeedDescriptionShort" (delimit (first 2 (split ($description | plainify | html | htmlUnescape) "\n")) " " | truncate 250)
+ "FeedEnclosure" ($enclosure | plainify | html | htmlUnescape)
+ "FeedImageLink" ($imageLink | plainify | html | htmlUnescape)
+ "FeedLink" ($link | plainify | html | htmlUnescape)
+ "FeedName" (delimit ((delimit (first 2 (split ($sourceTitle | plainify | html | htmlUnescape) " ")) " ") | findRE "^([^.|?|!|\n|\"|]+)") " " | replaceRE "[^a-zA-Z ]" "")
+ "FeedSourceDescription" ($sourceDescription | plainify | html | htmlUnescape)
+ "FeedSourceDomain" ($sourceDomain | plainify | html | htmlUnescape)
+ "FeedSourceLink" ($sourceLink | plainify | html | htmlUnescape)
+ "FeedSourceHome" ($sourceHome | plainify | html | htmlUnescape)
+ "FeedSourceTitle" ($sourceTitle | plainify | html | htmlUnescape)
+ "FeedTitle" ($title | plainify | html | htmlUnescape)
)
-}}