Don’t print santized escape codes
This commit is contained in:
parent
12b0f81eb8
commit
6641b7c63c
|
@ -69,7 +69,7 @@ sfeed_post_text() {
|
||||||
local unix_date="$(echo "$line" | awk --field-separator '\t' '{print $1}')"
|
local unix_date="$(echo "$line" | awk --field-separator '\t' '{print $1}')"
|
||||||
local title="$(echo "$line" | awk --field-separator '\t' '{print $2}')"
|
local title="$(echo "$line" | awk --field-separator '\t' '{print $2}')"
|
||||||
local url="$(echo "$line" | awk --field-separator '\t' '{print $3}' | url_deescape)"
|
local url="$(echo "$line" | awk --field-separator '\t' '{print $3}' | url_deescape)"
|
||||||
local desc="$(echo "$line" | awk --field-separator '\t' '{print $4}' | tr -d '\n')"
|
local desc="$(echo "$line" | awk --field-separator '\t' '{print $4}')"
|
||||||
local desc_snip="$(echo "$desc" | head -c250)[…]"
|
local desc_snip="$(echo "$desc" | head -c250)[…]"
|
||||||
|
|
||||||
printf "$TEMPLATE" \
|
printf "$TEMPLATE" \
|
||||||
|
@ -78,7 +78,9 @@ sfeed_post_text() {
|
||||||
| sed "s|{{unix_date}}|$unix_date|g" \
|
| sed "s|{{unix_date}}|$unix_date|g" \
|
||||||
| sed "s|{{url}}|$url|g" \
|
| sed "s|{{url}}|$url|g" \
|
||||||
| sed "s|{{desc}}|$desc|g" \
|
| sed "s|{{desc}}|$desc|g" \
|
||||||
| sed "s|{{desc_short}}|$desc_snip|g"
|
| sed "s|{{desc_short}}|$desc_snip|g" \
|
||||||
|
| sed 's%\\n%%' \
|
||||||
|
| tr -d ' \n'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,6 +134,6 @@ fi
|
||||||
|
|
||||||
IFS="
|
IFS="
|
||||||
"
|
"
|
||||||
while read line; do
|
while read -r line; do
|
||||||
post_sfeed_line "$SERVER_URL" "$FEDI_AUTH" "$line"
|
post_sfeed_line "$SERVER_URL" "$FEDI_AUTH" "$line"
|
||||||
done
|
done
|
||||||
|
|
Ŝarĝante…
Reference in New Issue