--- a/src/query/reslistpager.cpp
+++ b/src/query/reslistpager.cpp
@@ -167,6 +167,13 @@
     string url;
     printableUrl(config->getDefCharset(), doc.url, url);
 
+    // Same as url, but with file:// possibly stripped. output by %u instead
+    // of %U. 
+    string urlOrLocal;
+    urlOrLocal = fileurltolocalpath(url);
+    if (urlOrLocal.empty())
+        urlOrLocal = url;
+
     // Make title out of file name if none yet
     string titleOrFilename;
     string utf8fn;
@@ -301,6 +308,7 @@
     subs["T"] = maybeEscapeHtml(titleOrFilename);
     subs["t"] = maybeEscapeHtml(doc.meta[Rcl::Doc::keytt]);
     subs["U"] = url;
+    subs["u"] = urlOrLocal;
 
     // Let %(xx) access all metadata. HTML-neuter everything:
     for (map<string,string>::iterator it = doc.meta.begin();