From a674134c624a446cfe25088c2b6840577f45447f Mon Sep 17 00:00:00 2001 From: infinitefusion Date: Sun, 22 Dec 2024 13:44:22 -0500 Subject: [PATCH] Skip json string cleaning on mobile --- Data/Scripts/001_Technical/002_Files/003_HTTP_Utilities.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Data/Scripts/001_Technical/002_Files/003_HTTP_Utilities.rb b/Data/Scripts/001_Technical/002_Files/003_HTTP_Utilities.rb index 87df95455..7d480bae4 100644 --- a/Data/Scripts/001_Technical/002_Files/003_HTTP_Utilities.rb +++ b/Data/Scripts/001_Technical/002_Files/003_HTTP_Utilities.rb @@ -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/, '')