5d8187d0 by astaxie

Merge pull request #977 from athurg/patch-1

Fix RequestURI nil caused template parse failed
2 parents 0e1a0049 d961ae4c
...@@ -114,7 +114,7 @@ func (p *Paginator) Pages() []int { ...@@ -114,7 +114,7 @@ func (p *Paginator) Pages() []int {
114 114
115 // Returns URL for a given page index. 115 // Returns URL for a given page index.
116 func (p *Paginator) PageLink(page int) string { 116 func (p *Paginator) PageLink(page int) string {
117 link, _ := url.ParseRequestURI(p.Request.RequestURI) 117 link, _ := url.ParseRequestURI(p.Request.URL.String())
118 values := link.Query() 118 values := link.Query()
119 if page == 1 { 119 if page == 1 {
120 values.Del("p") 120 values.Del("p")
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!