@@ -2,6 +2,7 @@ package handles
2
2
3
3
import (
4
4
"fmt"
5
+ "html"
5
6
"net/url"
6
7
"strings"
7
8
@@ -43,27 +44,24 @@ func Plist(c *gin.Context) {
43
44
common .ErrorResp (c , err , 400 )
44
45
return
45
46
}
46
- fullName := c .Param ("name" )
47
- Url := link .String ()
48
- Url = strings .ReplaceAll (Url , "<" , "[" )
49
- Url = strings .ReplaceAll (Url , ">" , "]" )
50
47
nameEncode := linkNameSplit [1 ]
51
- fullName , err = url .PathUnescape (nameEncode )
48
+ fullName , err : = url .PathUnescape (nameEncode )
52
49
if err != nil {
53
50
common .ErrorResp (c , err , 400 )
54
51
return
55
52
}
56
53
name := fullName
57
- identifier := fmt .Sprintf ("ci.nn.%s" , url .PathEscape (fullName ))
58
- sep := "@"
59
- if strings .Contains (fullName , sep ) {
60
- ss := strings .Split (fullName , sep )
61
- name = strings .Join (ss [:len (ss )- 1 ], sep )
54
+ identifier := fmt .Sprintf ("org.oplist.%s" , fullName )
55
+ if strings .Contains (fullName , "@" ) {
56
+ ss := strings .Split (fullName , "@" )
57
+ name = strings .Join (ss [:len (ss )- 1 ], "@" )
62
58
identifier = ss [len (ss )- 1 ]
63
59
}
64
-
65
- name = strings .ReplaceAll (name , "<" , "[" )
66
- name = strings .ReplaceAll (name , ">" , "]" )
60
+ Url := link .String ()
61
+ Url = strings .ReplaceAll (Url , "<" , "<" )
62
+ Url = strings .ReplaceAll (Url , ">" , ">" )
63
+ name = html .EscapeString (name )
64
+ identifier = html .EscapeString (identifier )
67
65
plist := fmt .Sprintf (`<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
68
66
<plist version="1.0">
69
67
<dict>
0 commit comments