From: Joann Mõndresku Date: Thu, 15 Jul 2021 21:29:40 +0000 (+0300) Subject: Fix RSS ampersand issue in blogit. X-Git-Url: https://git.based.quest/index.html?a=commitdiff_plain;h=a9f6852b77e4524a98301fadc1fbe880a4ee370a;p=web-old.git Fix RSS ampersand issue in blogit. --- diff --git a/blogit b/blogit index 6035d1e..5be2429 100755 --- a/blogit +++ b/blogit @@ -176,11 +176,11 @@ blog/rss.xml: $(ARTICLES) git log --diff-filter=A --date="format:%s %a, %d %b %Y %H:%M:%S %z" --pretty=format:'%ad%n' -- "$$f"; \ done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE; do \ printf '\n%s\n%s\n%s\n%s\n%s\n\n' \ - "`head -n 1 $$FILE`" \ + "`head -n 1 $$FILE | sed 's/&/&/'`" \ "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \ "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \ "$$DATE" \ - "`sed -n '1d;/^$$/{2{d;b};q};p' < $$FILE`"; \ + "`sed -n 's/&/&/;1d;/^$$/{2{d;b};q};p' < $$FILE`"; \ done >> $@ printf '\n\n' >> $@ @@ -192,12 +192,12 @@ blog/atom.xml: $(ARTICLES) git log --diff-filter=A --date="format:%s %Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad %aN%n' -- "$$f"; \ done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE AUTHOR; do \ printf '\n%s\n\n%s\n%s\n%s\n%s\n%s\n\n' \ - "`head -n 1 $$FILE`" \ + "`head -n 1 $$FILE | sed 's/&/&/'`" \ "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \ "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \ "$$DATE" \ "`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \ "$$AUTHOR" \ - "`sed -n '1d;/^$$/{2{d;b};q};p' < $$FILE`"; \ + "`sed -n 's/&/&/;1d;/^$$/{2{d;b};q};p' < $$FILE`"; \ done >> $@ printf '\n' >> $@