Escape ampersand & in the filename also.

I am amazed what stupid filenames some people come up with, instead of
abiding by old good [a-zA-Z0-9] character set and 8.3 filename length...
This commit is contained in:
Tigran Aivazian
2012-10-24 22:03:35 +01:00
committed by Qingping Hou
parent ed76aa78f4
commit 9348b5c553

View File

@@ -13,7 +13,7 @@ progname=$(basename $0)
function escape_tex_specialchars()
{
local txt=$1
local res=$(echo "$txt" | sed -e "s%_%\\\_%g")
local res=$(echo "$txt" | sed -e "s%_%\\\_%g" -e "s%&%\\\&%g")
echo "$res"
}