summaryrefslogtreecommitdiffstats
path: root/cnhttp.go
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2017-09-20 16:57:49 +0200
committerclsr <clsr@clsr.net>2017-09-20 16:57:49 +0200
commit605b2f39dfa8c45fc3271c77f6fe37a9c2af9305 (patch)
treee1296124ee39b87c07b7aa2c32a66b478be4826b /cnhttp.go
parent216a17304a0efb8b2b30346d38998723093aa4ac (diff)
downloadcn-http-605b2f39dfa8c45fc3271c77f6fe37a9c2af9305.tar.gz
cn-http-605b2f39dfa8c45fc3271c77f6fe37a9c2af9305.zip
Support queries in URLsv0.2.2
Diffstat (limited to 'cnhttp.go')
-rw-r--r--cnhttp.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cnhttp.go b/cnhttp.go
index 29d3cc6..f9f9a30 100644
--- a/cnhttp.go
+++ b/cnhttp.go
@@ -551,7 +551,7 @@ func (srv *server) handleTags(req *cnp.Request, buf *bytes.Buffer, tags *[]strin
}
close := map[string]bool{
- "b": old.Emphasized && !new.Emphasized,
+ "b": old.Emphasized && !new.Emphasized,
"i": old.Alternate && !new.Alternate,
"code": old.Code && !new.Code,
"q": old.Quote && !new.Quote,
@@ -559,7 +559,7 @@ func (srv *server) handleTags(req *cnp.Request, buf *bytes.Buffer, tags *[]strin
}
open := map[string]bool{
- "b": !old.Emphasized && new.Emphasized,
+ "b": !old.Emphasized && new.Emphasized,
"i": !old.Alternate && new.Alternate,
"code": !old.Code && new.Code,
"q": !old.Quote && new.Quote,
@@ -626,6 +626,9 @@ func (srv *server) linkToURL(req *cnp.Request, link string) (urlStr, extern stri
}
urlStr = "/" + host + cnp.Clean("/"+urlStr)
}
+ if u.RawQuery != "" {
+ urlStr += "?" + u.RawQuery
+ }
if u.Fragment != "" {
urlStr += "#" + u.Fragment
}