aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/render.js b/lib/render.js
index 15d7783..afb181f 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -222,9 +222,13 @@ Render.prototype.toUrl = function (href) {
}
switch (href[0]) {
case '%':
- if (!u.isRef(href)) return false
+ var parts = href.split('?')
+ var hash = parts.shift()
+ var query = parts.join('?')
+ if (!u.isRef(hash)) return false
return this.opts.base +
- (this.opts.encode_msgids ? encodeURIComponent(href) : href)
+ (this.opts.encode_msgids ? encodeURIComponent(hash) : hash)
+ + (query ? '?' + query : '')
case '@':
if (!u.isRef(href.replace(/\?.*/, ''))) return false
return this.opts.base + href