Make sure no non-utf8 characters get through the fml module.
This commit is contained in:
parent
4aeb0f4618
commit
273e24a63a
@ -1,6 +1,6 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | pandoc -f html -t plain | tr '[:space:]' ' ')"
|
||||
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | pandoc -f html -t plain | tr '[:space:]' ' ' | tr -cd '[:print:]')"
|
||||
|
||||
if [[ ${#fml} -gt 10 ]]; then
|
||||
msg "$2" "${fml}"
|
||||
|
Loading…
Reference in New Issue
Block a user