Make sure no non-utf8 characters get through the fml module.

This commit is contained in:
Storm Dragon 2020-08-13 19:48:24 -04:00
parent 4aeb0f4618
commit 273e24a63a
1 changed files with 1 additions and 1 deletions

View File

@ -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}"