diff --git a/lib/bundle/mac_app_store_dumper.rb b/lib/bundle/mac_app_store_dumper.rb index 8acc69de0..f3548985e 100644 --- a/lib/bundle/mac_app_store_dumper.rb +++ b/lib/bundle/mac_app_store_dumper.rb @@ -16,7 +16,8 @@ def apps app_details = app.match(/\A(?\d+)\s+(?.*?)\s+\((?[\d.]*)\)\Z/) # Only add the application details should we have a valid match. - [app_details[:id], app_details[:name]] if app_details + # Strip unprintable characters + [app_details[:id], app_details[:name].gsub(/[[:cntrl:]]|[\p{C}]/, "")] if app_details end else [] diff --git a/spec/bundle/mac_app_store_dumper_spec.rb b/spec/bundle/mac_app_store_dumper_spec.rb index c70e93149..e21cefc0c 100644 --- a/spec/bundle/mac_app_store_dumper_spec.rb +++ b/spec/bundle/mac_app_store_dumper_spec.rb @@ -70,6 +70,7 @@ 896732467 你好 (1.1) 634324555 مرحبا (1.0) 234324325 áéíóú (1.0) + 310633997 non>‎