mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds toggle for displaying generated entries or not + fixes issue when cleaning json strings
This commit is contained in:
@@ -119,11 +119,11 @@ def downloadAllowed?()
|
||||
end
|
||||
|
||||
def clean_json_string(str)
|
||||
return str if $PokemonSystem.on_mobile
|
||||
#echoln str
|
||||
#return str if $PokemonSystem.on_mobile
|
||||
# Remove non-UTF-8 characters and unexpected control characters
|
||||
#cleaned_str = str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
||||
cleaned_str = str
|
||||
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/, '')
|
||||
|
||||
@@ -137,6 +137,7 @@ def clean_json_string(str)
|
||||
cleaned_str = cleaned_str.gsub(/\\u([\da-fA-F]{4})/) { |match|
|
||||
[$1.to_i(16)].pack("U")
|
||||
}
|
||||
echoln cleaned_str
|
||||
return cleaned_str
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user