Comment 7 for bug 166199

Revision history for this message
Arondylos (arondylos) wrote :

BTW, a short bash script attempting to automatically fix the issues for
CorelDRAW svgs follows. It's a quick and dirty hack and might eat all
your files.

--snip--
#!/bin/bash

if grep -q "<!-- Creator: CorelDRAW -->" $1
then
        echo "Corel DRAW SVG - proceeding"
        if grep -q "xmlns:xlink" $1
        then echo "already has xlink namespace definition - not adding"
        else
                echo "adding xlink namespace definition"
                sed -i -e 's/svg xmlns=/svg xmlns:xlink="http:
\/\/www.w3.org\/1999\/xlink" xmlns=/' $1
        fi
        echo "converting *all* backslashes to slashes (very risky)"
        sed -i -e 's/\\/\//g' $1
else echo "Not a Corel DRAW SVG apparently"
fi