tools
/
wi
1
0
Fork 0

Fix replace url with id

master
dump_stack() 2016-07-26 00:04:32 +03:00
parent 69d33189ad
commit 50b0c0a520
1 changed files with 3 additions and 1 deletions

View File

@ -38,8 +38,10 @@ func parseLink(db *sql.DB, oldPage, value string, req *http.Request) (htmlPage s
}
}
htmlPage = oldPage
for _, s := range []string{value, html.EscapeString(value)} {
htmlPage = strings.Replace(oldPage, "\""+s+"\"",
htmlPage = strings.Replace(htmlPage, "\""+s+"\"",
"\""+fmt.Sprintf("%d", linkNo)+"\"", -1)
}