GUI open: make %U output an url_encoded version of the url. It was previously the same as %u, and not used in default files

This commit is contained in:
Jean-Francois Dockes 2016-01-05 09:19:14 +01:00
parent bbdb963f5a
commit 86e270df0a

View File

@ -147,7 +147,7 @@ void RclMain::openWith(Rcl::Doc doc, string cmdspec)
map<string, string> subs;
subs["F"] = fn;
subs["f"] = fn;
subs["U"] = url;
subs["U"] = url_encode(url);
subs["u"] = url;
execViewer(subs, false, execname, lcmd, cmdspec, doc);
@ -372,7 +372,7 @@ void RclMain::startNativeViewer(Rcl::Doc doc, int pagenum, QString term)
subs["M"] = doc.mimetype;
subs["p"] = cpagenum;
subs["s"] = (const char*)term.toLocal8Bit();
subs["U"] = url;
subs["U"] = url_encode(url);
subs["u"] = url;
// Let %(xx) access all metadata.
for (map<string,string>::const_iterator it = doc.meta.begin();