--- xdg-open.in.orig 2014-02-07 18:17:03.000000000 +0400 +++ xdg-open.in 2015-03-11 17:57:51.457172487 +0400 @@ -266,7 +266,13 @@ if (echo "$1" | grep -q '^file://' || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:') then - local file="$(echo "$1" | sed 's%^file://%%')" + local file="$1" + + # Decode URLs + if echo "$file" | grep -q '^file:///'; then + file=${file#file://} + file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")" + fi # handle relative paths if ! echo "$file" | grep -q '^/'; then