mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Skip json string cleaning on mobile
This commit is contained in:
@@ -119,9 +119,10 @@ def downloadAllowed?()
|
||||
end
|
||||
|
||||
def clean_json_string(str)
|
||||
return str if $PokemonSystem.on_mobile
|
||||
# Remove non-UTF-8 characters and unexpected control characters
|
||||
cleaned_str = str
|
||||
cleaned_str = str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '') if !$PokemonSystem.on_mobile
|
||||
cleaned_str = str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
||||
|
||||
# Remove literal \n, \r, \t, etc.
|
||||
cleaned_str = cleaned_str.gsub(/\\n|\\r|\\t/, '')
|
||||
|
||||
Reference in New Issue
Block a user