File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,6 @@ func TibiaDataQueryEscapeString(data string) string {
8787 // switching "+" to " "
8888 data = strings .ReplaceAll (data , "+" , " " )
8989
90- // encoding string to latin-1
91- data , _ = TibiaDataConvertEncodingtoISO88591 (data )
92-
9390 // returning with QueryEscape function
9491 return url .QueryEscape (data )
9592}
Original file line number Diff line number Diff line change @@ -150,16 +150,19 @@ func TestEscaper(t *testing.T) {
150150 strOne = "god durin"
151151 strTwo = "god+durin"
152152 strThree = "gód"
153+ strFour = "Näurin"
153154 )
154155
155156 sanitizedStrOne := TibiaDataQueryEscapeString (strOne )
156157 sanitizedStrTwo := TibiaDataQueryEscapeString (strTwo )
157158 sanitizedStrThree := TibiaDataQueryEscapeString (strThree )
159+ sanitizedStrFour := TibiaDataQueryEscapeString (strFour )
158160
159161 assert := assert .New (t )
160162 assert .Equal (sanitizedStrOne , "god+durin" )
161163 assert .Equal (sanitizedStrTwo , "god+durin" )
162- assert .Equal (sanitizedStrThree , "g%F3d" )
164+ assert .Equal (sanitizedStrThree , "g%C3%B3d" )
165+ assert .Equal (sanitizedStrFour , "N%C3%A4urin" )
163166}
164167
165168func TestDateParser (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments