Skip to content

Commit e8a794b

Browse files
committed
fix bug
1 parent 9832421 commit e8a794b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

web.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ func download(url string) bool {
1717
if fileName == "" {
1818
fileName = "noname"
1919
}
20-
fileName = strings.Replace(fileName, "?", "", -1)
21-
fileName = strings.Replace(fileName, "#", "", -1)
20+
fileName = strings.Replace(fileName, "?", "_", -1)
21+
fileName = strings.Replace(fileName, "#", "_", -1)
22+
fileName = strings.Replace(fileName, "&", "_", -1)
2223
out, _ := os.Create("./download/" + fileName)
2324
defer out.Close()
2425
statusCode, body, err := fasthttp.Get(nil, url)
@@ -128,11 +129,11 @@ func main() {
128129
</style>
129130
<div class="am-footer-miscs">
130131
<p>友情链接 &nbsp;<a href="http://www.lanyus.com/" rel="friend" target="_blank">无心问世</a></p> &nbsp;
131-
<p><a href="https://github.com/ilanyu/offline-download" target="_blank">关于</a></p>
132+
<p><a href="https://github.com/ilanyu/offLineDownloader" target="_blank">关于</a></p>
132133
<p class="am-article-meta">
133134
</p><p><a href="#" target="_blank"><span class="am-icon-qq am-success" target="_blank"></span> 程序开发 无心问世</a></p>
134135
<br>
135-
<p>© 2015 无心问世. copyright</p>
136+
<p>© 2016 无心问世. copyright</p>
136137
</div>
137138
</footer>
138139

0 commit comments

Comments
 (0)