- Fix % error in url encode - FIx alldebrid downloading bug - Fix dupicate checks for newly added torrents
22 lines
328 B
Go
22 lines
328 B
Go
package utils
|
|
|
|
import "strings"
|
|
|
|
func EscapePath(path string) string {
|
|
// escape %
|
|
escapedPath := strings.ReplaceAll(path, "%", "%25")
|
|
|
|
// add others
|
|
|
|
return escapedPath
|
|
}
|
|
|
|
func UnescapePath(path string) string {
|
|
// unescape %
|
|
unescapedPath := strings.ReplaceAll(path, "%25", "%")
|
|
|
|
// add others
|
|
|
|
return unescapedPath
|
|
}
|