diff options
author | clsr <clsr@clsr.net> | 2017-09-20 16:57:49 +0200 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2017-09-20 16:57:49 +0200 |
commit | 605b2f39dfa8c45fc3271c77f6fe37a9c2af9305 (patch) | |
tree | e1296124ee39b87c07b7aa2c32a66b478be4826b | |
parent | 216a17304a0efb8b2b30346d38998723093aa4ac (diff) | |
download | cn-http-0.2.2.tar.gz cn-http-0.2.2.zip |
Support queries in URLsv0.2.2
-rw-r--r-- | cnhttp.go | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 } |