From 066edd99d7a6102041300917d21fbca441dff1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Wed, 4 Jan 2017 19:10:45 +0100 Subject: [PATCH] Handle html entities from tooltip --- xkcdlock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xkcdlock b/xkcdlock index c55970c..96c83f6 100755 --- a/xkcdlock +++ b/xkcdlock @@ -45,7 +45,7 @@ IMG_DEFAULT="not_really_into_pokemon.png" # background colour BG_COLOUR="white" -declare -a DEPS=("xrandr" "awk" "curl" "convert") +declare -a DEPS=("xrandr" "awk" "curl" "convert" "recode") declare -a DEPS_LOCKER=("i3lock" "swaylock") DOWNLOAD_DISCLAIMER="\nThe downloaded images will end up in your current working directory.\n\ @@ -178,7 +178,7 @@ xkcd_get_hotlink_url() { xkcd_get_img_tooltip() { local url="https://xkcd.com/$1" - echo $(curl -sL $url | grep -A 1 '
' | awk -F "\"" '/src=/ {print $4}') + echo $(curl -sL $url | grep -A 1 '
' | awk -F "\"" '/src=/ {print $4}' | recode html..UTF8) } get_nscreens() {