fixed html handling

This commit is contained in:
Emma Tebibyte 2022-09-02 02:20:18 -04:00
parent aa8cecba5a
commit ac7a5d2060

View File

@ -2,12 +2,14 @@
echo "Determining MIME type of $1:"
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | tr -d '\r')
MIME=$(curl -I -s "$1" | sed -n -e 's/^content-type: //p' | sed -n -e 's/;.\+//p' | tr -d '\r')
echo $MIME
BROWSER=$(cat /etc/xdg-sanity.conf | sed -n -e 's/^browser = //p')
BROWSER=$(cat /etc/xdg-sanity.conf | sed -n -e 's/^browser = //p' )
# add application/x-xpinstall text/xml application/xhtml+xml x-scheme-handler/https handling
# fix text/html; charset=utf-8 handling
if [ "$MIME" = "text/html" ]
then
$BROWSER $1