patch from Phenom to encode non standard character in file names correctly in RS links

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6600 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-08-23 20:34:50 +00:00
parent 1273e8179f
commit 5aedf393b2

View File

@ -698,7 +698,32 @@ QString RetroShareLink::title() const
static QString encodeItem(QString item)
{
return item.replace(" ", "%20").replace("&", "%26").replace("#", "%23").replace("\"", "%22");
return item
// .replace("{", "%"+QString::number((int)'{'))
// .replace("}", "%"+QString::number((int)'}'))
// .replace("[", "%"+QString::number((int)'['))
// .replace("]", "%"+QString::number((int)']'))
// .replace("^", "%"+QString::number((int)'^'))
// .replace("~", "%"+QString::number((int)'~'))
// .replace(";", "%"+QString::number((int)';'))
// .replace(":", "%"+QString::number((int)':'))
// .replace("=", "%"+QString::number((int)'='))
// .replace("+", "%"+QString::number((int)'+'))
// .replace("$", "%"+QString::number((int)'$'))
// .replace(",", "%"+QString::number((int)','))
// .replace("\"", "%"+QString::number((int)'\"'))
// .replace("|", "%"+QString::number((int)'|'))
// .replace("?", "%"+QString::number((int)'?'))
// .replace("@", "%"+QString::number((int)'@'))
.replace("&", "%"+QString::number((int)'&'))//Not necessary: only for text link
.replace("/", "%"+QString::number((int)'/'))
// .replace(" ", "%"+QString::number((int)' '))
.replace("#", "%"+QString::number((int)'#'))
// .replace("£", "%"+QString::number((int)'£'))
// .replace("µ", "%"+QString::number((int)'µ'))
// .replace("§", "%"+QString::number((int)'§'))
// .replace("!", "%"+QString::number((int)'!'))
;
}
QString RetroShareLink::toString() const