Substitute some HTML entities. - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset 1a44a60ebf9a146de0009a8212c302b7c7455a70
(DIR) parent 723ff8a4e470b380b9aefc71d152c59de30cbe04
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 13 Aug 2018 00:41:17
Substitute some HTML entities.
XXX: < was still not found so no gsub() added for it ATM
Diffstat:
reddit/c.dcgi | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff -r 723ff8a4e470 -r 1a44a60ebf9a reddit/c.dcgi
--- a/reddit/c.dcgi Thu Aug 09 00:31:17 2018 +0200
+++ b/reddit/c.dcgi Mon Aug 13 00:41:17 2018 +0200
@@ -22,14 +22,14 @@
"tComments: \(.num_comments)",
"t",
if .selftext != "" then
- "t\(.selftext | split("\n") | join("\nt") )",
+ "t\(.selftext | gsub(">"; ">") | gsub("&"; "&") | split("\n") | join("\nt") )",
"t"
else
empty
end ),
( .[1] | .. | select(.kind? == "t1") | .data |
"t\(.author) \(.score) \( .created_utc | strftime("%F %H:%M") )",
- "t\(.body | split("\n") | join("\nt") )",
+ "t\(.body | gsub(">"; ">") | gsub("&"; "&") | split("\n") | join("\nt") )",
"t",
"t" )
'