|
|
@@ -8,6 +8,7 @@ package repo |
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"io" |
|
|
|
"net/url" |
|
|
|
"path" |
|
|
|
"strings" |
|
|
|
|
|
|
@@ -32,6 +33,7 @@ func ServeData(ctx *context.Context, name string, reader io.Reader) error { |
|
|
|
|
|
|
|
// Google Chrome dislike commas in filenames, so let's change it to a space |
|
|
|
name = strings.Replace(name, ",", " ", -1) |
|
|
|
name = url.QueryEscape(name) |
|
|
|
|
|
|
|
if base.IsTextFile(buf) || ctx.QueryBool("render") { |
|
|
|
cs, err := charset.DetectEncoding(buf) |
|
|
|