rho-tau-extensions 6.0.0 → 7.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/libs/android_net_native_prebuilt/ext/build +22 -0
- data/libs/android_net_native_prebuilt/ext/build.bat +44 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/android_net_native.jar +0 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/lib/aarch64/libandroid_net_native.a +0 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/lib/armeabi/libandroid_net_native.a +0 -0
- data/libs/android_net_native_prebuilt/ext/platform/android/lib/x86/libandroid_net_native.a +0 -0
- data/libs/android_net_native_prebuilt/ext.yml +8 -0
- data/libs/crosswalk/ext/platform/android/Rakefile +19 -1
- data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkcore.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkdummy.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/native_lib_placeholder.stamp +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkcore.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkdummy.so +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/x86/native_lib_placeholder.stamp +0 -0
- data/libs/crosswalk/ext/platform/android/adds/lib/xwalk_core_library_java.jar +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/layout/dropdown_item.xml +1 -1
- data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/dropdown_item.xml +2 -2
- data/libs/crosswalk/ext/platform/android/adds/res/menu/select_action_menu.xml +8 -8
- data/libs/crosswalk/ext/platform/android/adds/res/raw/icudtl.dat +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk.pak +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk_100_percent.pak +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_attrs.xml → attrs.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/attrs_03.xml +18 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_colors.xml → colors_xwalk.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_dimens.xml → dimens_03.xml} +1 -3
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_dimens.xml → dimens_xwalk.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/ids_xwalk.xml +12 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/strings_00.xml +16 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_internal_java_strings.xml → strings_01.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_core_java_strings.xml → strings_02.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_strings.xml → strings_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_styles.xml → styles_00.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{ui_java_styles.xml → styles_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/{xwalk_values.xml → values_00.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_app_strings.xml +7 -10
- data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_resources_list.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_ui_strings.xml +4 -3
- data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_ui_strings.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_ui_strings.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_ui_strings.xml +2 -1
- data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-v17/{ui_java_styles.xml → styles_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-v21/{ui_java_styles.xml → styles_03.xml} +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_ui_strings.xml +1 -0
- data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWalkWebView.java +18 -1
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/aarch64/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
- data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
- data/libs/enterprise-barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +8 -4
- data/libs/enterprise-barcode/ext/platform/iphone/Rakefile +9 -58
- data/libs/fcm-push-18/ext/android/AndroidManifest.rb +10 -0
- data/libs/fcm-push-18/ext/android/ApplicationManifestAdds.erb +39 -0
- data/libs/fcm-push-18/ext/android/Rakefile +187 -0
- data/libs/fcm-push-18/ext/android/ext_java.files +3 -0
- data/libs/fcm-push-18/ext/android/ext_native.files +1 -0
- data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.cpp +215 -0
- data/libs/fcm-push-18/ext/android/jni/src/fcmpushclient.h +74 -0
- data/libs/fcm-push-18/ext/android/res/res/values/fireBaseValues.xml +5 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMFacade.java +164 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +219 -0
- data/libs/fcm-push-18/ext/android/src/com/rhomobile/rhodes/fcm/FCMListener.java +88 -0
- data/libs/fcm-push-18/ext/build +16 -0
- data/libs/fcm-push-18/ext/build.bat +8 -0
- data/libs/fcm-push-18/ext/fcm.xml +9 -0
- data/libs/fcm-push-18/ext/iphone/ApplePush_Prefix.pch +7 -0
- data/libs/fcm-push-18/ext/iphone/Firebase.h +68 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h +62 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +115 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsConfiguration.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h +13 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRApp.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRConfiguration.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h +389 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIROptions.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRParameterNames.h +485 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h +15 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h +10 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseAnalytics.framework/Modules/module.modulemap +10 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/FirebaseCore +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h +52 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRApp.h +130 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRConfiguration.h +78 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIRLoggerLevel.h +35 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FIROptions.h +133 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Headers/FirebaseCore.h +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCore.framework/Modules/module.modulemap +7 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseCoreDiagnostics.framework/Modules/module.modulemap +6 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/FirebaseInstanceID +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +276 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseInstanceID.framework/Modules/module.modulemap +7 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/FirebaseMessaging +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FIRMessaging.h +508 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Headers/FirebaseMessaging.h +1 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseMessaging.framework/Modules/module.modulemap +8 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/FirebaseNanoPB.framework/FirebaseNanoPB +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/GoogleToolboxForMac.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/Protobuf.framework/Protobuf +0 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/Modules/module.modulemap +5 -0
- data/libs/fcm-push-18/ext/iphone/Frameworks/nanopb.framework/nanopb +0 -0
- data/libs/fcm-push-18/ext/iphone/Rakefile +30 -0
- data/libs/fcm-push-18/ext/iphone/fcm-push.xcodeproj/project.pbxproj +370 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.h +28 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.m +27 -0
- data/libs/fcm-push-18/ext/iphone/impl/PushNotificationsReceiver.mm +234 -0
- data/libs/fcm-push-18/ext/iphone/impl/applePushSetup.c +10 -0
- data/libs/fcm-push-18/ext/iphone/impl/applepushclient.h +69 -0
- data/libs/fcm-push-18/ext/iphone/impl/applepushclient.mm +164 -0
- data/libs/fcm-push-18/ext/iphone/impl/readme.txt +7 -0
- data/libs/fcm-push-18/ext/platform/iphone/impl/readme.txt +7 -0
- data/libs/fcm-push-18/ext.yml +20 -0
- data/libs/nodejs/ext/platform/android/jxCore/jx.h +17 -1
- data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
- data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
- data/libs/nodejs/ext/platform/iphone/Nodejs.xcodeproj/project.pbxproj +8 -4
- data/libs/nodejs/ext/platform/iphone/Rakefile +9 -62
- data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +17 -1
- data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
- data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
- data/libs/openssl.so-edge/ext/android/armeabi/libcrypto.a +0 -0
- data/libs/openssl.so-edge/ext/android/armeabi/libssl.a +0 -0
- data/libs/openssl.so-edge/ext/android/x86/libcrypto.a +0 -0
- data/libs/openssl.so-edge/ext/android/x86/libssl.a +0 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/asn1t.h +19 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dso.h +23 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/thread_once.h +5 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1.h +5 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1t.h +5 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bio.h +9 -12
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bn.h +1 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/buffer.h +1 -4
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf.h +1 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/crypto.h +5 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ct.h +17 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dh.h +24 -6
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dsa.h +1 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/e_os2.h +3 -16
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ec.h +7 -12
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/engine.h +0 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/err.h +3 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/evp.h +11 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/lhash.h +13 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/objects.h +2 -2
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ocsp.h +3 -16
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h +20 -8
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslv.h +3 -3
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rsa.h +2 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/seed.h +1 -3
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srtp.h +1 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl.h +85 -52
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl3.h +4 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/tls1.h +6 -6
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ui.h +10 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509.h +1 -1
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509_vfy.h +5 -0
- data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509v3.h +1 -0
- data/libs/rexml-edge/rexml/attlistdecl.rb +63 -0
- data/libs/rexml-edge/rexml/attribute.rb +192 -0
- data/libs/rexml-edge/rexml/cdata.rb +68 -0
- data/libs/rexml-edge/rexml/child.rb +97 -0
- data/libs/rexml-edge/rexml/comment.rb +80 -0
- data/libs/rexml-edge/rexml/doctype.rb +270 -0
- data/libs/rexml-edge/rexml/document.rb +291 -0
- data/libs/rexml-edge/rexml/dtd/attlistdecl.rb +11 -0
- data/libs/rexml-edge/rexml/dtd/dtd.rb +47 -0
- data/libs/rexml-edge/rexml/dtd/elementdecl.rb +18 -0
- data/libs/rexml-edge/rexml/dtd/entitydecl.rb +57 -0
- data/libs/rexml-edge/rexml/dtd/notationdecl.rb +40 -0
- data/libs/rexml-edge/rexml/element.rb +1241 -0
- data/libs/rexml-edge/rexml/encoding.rb +51 -0
- data/libs/rexml-edge/rexml/entity.rb +174 -0
- data/libs/rexml-edge/rexml/formatters/default.rb +112 -0
- data/libs/rexml-edge/rexml/formatters/pretty.rb +142 -0
- data/libs/rexml-edge/rexml/formatters/transitive.rb +58 -0
- data/libs/rexml-edge/rexml/functions.rb +418 -0
- data/libs/rexml-edge/rexml/instruction.rb +71 -0
- data/libs/rexml-edge/rexml/light/node.rb +196 -0
- data/libs/rexml-edge/rexml/namespace.rb +48 -0
- data/libs/rexml-edge/rexml/node.rb +76 -0
- data/libs/rexml-edge/rexml/output.rb +30 -0
- data/libs/rexml-edge/rexml/parent.rb +166 -0
- data/libs/rexml-edge/rexml/parseexception.rb +52 -0
- data/libs/rexml-edge/rexml/parsers/baseparser.rb +533 -0
- data/libs/rexml-edge/rexml/parsers/lightparser.rb +59 -0
- data/libs/rexml-edge/rexml/parsers/pullparser.rb +197 -0
- data/libs/rexml-edge/rexml/parsers/sax2parser.rb +273 -0
- data/libs/rexml-edge/rexml/parsers/streamparser.rb +61 -0
- data/libs/rexml-edge/rexml/parsers/treeparser.rb +101 -0
- data/libs/rexml-edge/rexml/parsers/ultralightparser.rb +57 -0
- data/libs/rexml-edge/rexml/parsers/xpathparser.rb +657 -0
- data/libs/rexml-edge/rexml/quickpath.rb +266 -0
- data/libs/rexml-edge/rexml/rexml.rb +32 -0
- data/libs/rexml-edge/rexml/sax2listener.rb +98 -0
- data/libs/rexml-edge/rexml/security.rb +28 -0
- data/libs/rexml-edge/rexml/source.rb +297 -0
- data/libs/rexml-edge/rexml/streamlistener.rb +93 -0
- data/libs/rexml-edge/rexml/syncenumerator.rb +33 -0
- data/libs/rexml-edge/rexml/text.rb +426 -0
- data/libs/rexml-edge/rexml/undefinednamespaceexception.rb +9 -0
- data/libs/rexml-edge/rexml/validation/relaxng.rb +539 -0
- data/libs/rexml-edge/rexml/validation/validation.rb +144 -0
- data/libs/rexml-edge/rexml/validation/validationexception.rb +10 -0
- data/libs/rexml-edge/rexml/xmldecl.rb +116 -0
- data/libs/rexml-edge/rexml/xmltokens.rb +85 -0
- data/libs/rexml-edge/rexml/xpath.rb +81 -0
- data/libs/rexml-edge/rexml/xpath_parser.rb +704 -0
- data/version +1 -1
- metadata +144 -27
- data/libs/crosswalk/ext/platform/android/adds/res/drawable/launchscreen_bg.xml +0 -19
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-ldpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-mdpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/crosswalk.png +0 -0
- data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_suggestion_item.xml +0 -7
- data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_suggestion_item.xml +0 -18
- data/libs/crosswalk/ext/platform/android/adds/res/raw/contacts_api.js +0 -206
- data/libs/crosswalk/ext/platform/android/adds/res/raw/device_capabilities_api.js +0 -231
- data/libs/crosswalk/ext/platform/android/adds/res/raw/messaging_api.js +0 -359
- data/libs/crosswalk/ext/platform/android/adds/res/raw/presentation_api.js +0 -144
- data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_attrs.xml +0 -9
- data/libs/crosswalk/ext/platform/android/adds/res/values-v14/theme.xml +0 -16
@@ -0,0 +1,426 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
require 'rexml/security'
|
3
|
+
require 'rexml/entity'
|
4
|
+
require 'rexml/doctype'
|
5
|
+
require 'rexml/child'
|
6
|
+
require 'rexml/doctype'
|
7
|
+
require 'rexml/parseexception'
|
8
|
+
|
9
|
+
module REXML
|
10
|
+
# Represents text nodes in an XML document
|
11
|
+
class Text < Child
|
12
|
+
include Comparable
|
13
|
+
# The order in which the substitutions occur
|
14
|
+
SPECIALS = [ /&(?!#?[\w-]+;)/u, /</u, />/u, /"/u, /'/u, /\r/u ]
|
15
|
+
SUBSTITUTES = ['&', '<', '>', '"', ''', ' ']
|
16
|
+
# Characters which are substituted in written strings
|
17
|
+
SLAICEPS = [ '<', '>', '"', "'", '&' ]
|
18
|
+
SETUTITSBUS = [ /</u, />/u, /"/u, /'/u, /&/u ]
|
19
|
+
|
20
|
+
# If +raw+ is true, then REXML leaves the value alone
|
21
|
+
attr_accessor :raw
|
22
|
+
|
23
|
+
NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um
|
24
|
+
NUMERICENTITY = /�*((?:\d+)|(?:x[a-fA-F0-9]+));/
|
25
|
+
VALID_CHAR = [
|
26
|
+
0x9, 0xA, 0xD,
|
27
|
+
(0x20..0xD7FF),
|
28
|
+
(0xE000..0xFFFD),
|
29
|
+
(0x10000..0x10FFFF)
|
30
|
+
]
|
31
|
+
|
32
|
+
if String.method_defined? :encode
|
33
|
+
VALID_XML_CHARS = Regexp.new('^['+
|
34
|
+
VALID_CHAR.map { |item|
|
35
|
+
case item
|
36
|
+
when Fixnum
|
37
|
+
[item].pack('U').force_encoding('utf-8')
|
38
|
+
when Range
|
39
|
+
[item.first, '-'.ord, item.last].pack('UUU').force_encoding('utf-8')
|
40
|
+
end
|
41
|
+
}.join +
|
42
|
+
']*$')
|
43
|
+
else
|
44
|
+
VALID_XML_CHARS = /^(
|
45
|
+
[\x09\x0A\x0D\x20-\x7E] # ASCII
|
46
|
+
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
|
47
|
+
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
|
48
|
+
| [\xE1-\xEC\xEE][\x80-\xBF]{2} # straight 3-byte
|
49
|
+
| \xEF[\x80-\xBE]{2} #
|
50
|
+
| \xEF\xBF[\x80-\xBD] # excluding U+fffe and U+ffff
|
51
|
+
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
|
52
|
+
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
|
53
|
+
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
|
54
|
+
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
|
55
|
+
)*$/nx;
|
56
|
+
end
|
57
|
+
|
58
|
+
# Constructor
|
59
|
+
# +arg+ if a String, the content is set to the String. If a Text,
|
60
|
+
# the object is shallowly cloned.
|
61
|
+
#
|
62
|
+
# +respect_whitespace+ (boolean, false) if true, whitespace is
|
63
|
+
# respected
|
64
|
+
#
|
65
|
+
# +parent+ (nil) if this is a Parent object, the parent
|
66
|
+
# will be set to this.
|
67
|
+
#
|
68
|
+
# +raw+ (nil) This argument can be given three values.
|
69
|
+
# If true, then the value of used to construct this object is expected to
|
70
|
+
# contain no unescaped XML markup, and REXML will not change the text. If
|
71
|
+
# this value is false, the string may contain any characters, and REXML will
|
72
|
+
# escape any and all defined entities whose values are contained in the
|
73
|
+
# text. If this value is nil (the default), then the raw value of the
|
74
|
+
# parent will be used as the raw value for this node. If there is no raw
|
75
|
+
# value for the parent, and no value is supplied, the default is false.
|
76
|
+
# Use this field if you have entities defined for some text, and you don't
|
77
|
+
# want REXML to escape that text in output.
|
78
|
+
# Text.new( "<&", false, nil, false ) #-> "<&"
|
79
|
+
# Text.new( "<&", false, nil, false ) #-> "&lt;&amp;"
|
80
|
+
# Text.new( "<&", false, nil, true ) #-> Parse exception
|
81
|
+
# Text.new( "<&", false, nil, true ) #-> "<&"
|
82
|
+
# # Assume that the entity "s" is defined to be "sean"
|
83
|
+
# # and that the entity "r" is defined to be "russell"
|
84
|
+
# Text.new( "sean russell" ) #-> "&s; &r;"
|
85
|
+
# Text.new( "sean russell", false, nil, true ) #-> "sean russell"
|
86
|
+
#
|
87
|
+
# +entity_filter+ (nil) This can be an array of entities to match in the
|
88
|
+
# supplied text. This argument is only useful if +raw+ is set to false.
|
89
|
+
# Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell"
|
90
|
+
# Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell"
|
91
|
+
# In the last example, the +entity_filter+ argument is ignored.
|
92
|
+
#
|
93
|
+
# +illegal+ INTERNAL USE ONLY
|
94
|
+
def initialize(arg, respect_whitespace=false, parent=nil, raw=nil,
|
95
|
+
entity_filter=nil, illegal=NEEDS_A_SECOND_CHECK )
|
96
|
+
|
97
|
+
@raw = false
|
98
|
+
@parent = nil
|
99
|
+
|
100
|
+
if parent
|
101
|
+
super( parent )
|
102
|
+
@raw = parent.raw
|
103
|
+
end
|
104
|
+
|
105
|
+
@raw = raw unless raw.nil?
|
106
|
+
@entity_filter = entity_filter
|
107
|
+
clear_cache
|
108
|
+
|
109
|
+
if arg.kind_of? String
|
110
|
+
@string = arg.dup
|
111
|
+
@string.squeeze!(" \n\t") unless respect_whitespace
|
112
|
+
elsif arg.kind_of? Text
|
113
|
+
@string = arg.to_s
|
114
|
+
@raw = arg.raw
|
115
|
+
elsif
|
116
|
+
raise "Illegal argument of type #{arg.type} for Text constructor (#{arg})"
|
117
|
+
end
|
118
|
+
|
119
|
+
@string.gsub!( /\r\n?/, "\n" )
|
120
|
+
|
121
|
+
Text.check(@string, illegal, doctype) if @raw
|
122
|
+
end
|
123
|
+
|
124
|
+
def parent= parent
|
125
|
+
super(parent)
|
126
|
+
Text.check(@string, NEEDS_A_SECOND_CHECK, doctype) if @raw and @parent
|
127
|
+
end
|
128
|
+
|
129
|
+
# check for illegal characters
|
130
|
+
def Text.check string, pattern, doctype
|
131
|
+
|
132
|
+
# illegal anywhere
|
133
|
+
if string !~ VALID_XML_CHARS
|
134
|
+
if String.method_defined? :encode
|
135
|
+
string.chars.each do |c|
|
136
|
+
case c.ord
|
137
|
+
when *VALID_CHAR
|
138
|
+
else
|
139
|
+
raise "Illegal character #{c.inspect} in raw string \"#{string}\""
|
140
|
+
end
|
141
|
+
end
|
142
|
+
else
|
143
|
+
string.scan(/[\x00-\x7F]|[\x80-\xBF][\xC0-\xF0]*|[\xC0-\xF0]/n) do |c|
|
144
|
+
case c.unpack('U')
|
145
|
+
when *VALID_CHAR
|
146
|
+
else
|
147
|
+
raise "Illegal character #{c.inspect} in raw string \"#{string}\""
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# context sensitive
|
154
|
+
string.scan(pattern) do
|
155
|
+
if $1[-1] != ?;
|
156
|
+
raise "Illegal character '#{$1}' in raw string \"#{string}\""
|
157
|
+
elsif $1[0] == ?&
|
158
|
+
if $5 and $5[0] == ?#
|
159
|
+
case ($5[1] == ?x ? $5[2..-1].to_i(16) : $5[1..-1].to_i)
|
160
|
+
when *VALID_CHAR
|
161
|
+
else
|
162
|
+
raise "Illegal character '#{$1}' in raw string \"#{string}\""
|
163
|
+
end
|
164
|
+
# FIXME: below can't work but this needs API change.
|
165
|
+
# elsif @parent and $3 and !SUBSTITUTES.include?($1)
|
166
|
+
# if !doctype or !doctype.entities.has_key?($3)
|
167
|
+
# raise "Undeclared entity '#{$1}' in raw string \"#{string}\""
|
168
|
+
# end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
def node_type
|
175
|
+
:text
|
176
|
+
end
|
177
|
+
|
178
|
+
def empty?
|
179
|
+
@string.size==0
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
def clone
|
184
|
+
return Text.new(self)
|
185
|
+
end
|
186
|
+
|
187
|
+
|
188
|
+
# Appends text to this text node. The text is appended in the +raw+ mode
|
189
|
+
# of this text node.
|
190
|
+
#
|
191
|
+
# +returns+ the text itself to enable method chain like
|
192
|
+
# 'text << "XXX" << "YYY"'.
|
193
|
+
def <<( to_append )
|
194
|
+
@string << to_append.gsub( /\r\n?/, "\n" )
|
195
|
+
clear_cache
|
196
|
+
self
|
197
|
+
end
|
198
|
+
|
199
|
+
|
200
|
+
# +other+ a String or a Text
|
201
|
+
# +returns+ the result of (to_s <=> arg.to_s)
|
202
|
+
def <=>( other )
|
203
|
+
to_s() <=> other.to_s
|
204
|
+
end
|
205
|
+
|
206
|
+
def doctype
|
207
|
+
if @parent
|
208
|
+
doc = @parent.document
|
209
|
+
doc.doctype if doc
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
REFERENCE = /#{Entity::REFERENCE}/
|
214
|
+
# Returns the string value of this text node. This string is always
|
215
|
+
# escaped, meaning that it is a valid XML text node string, and all
|
216
|
+
# entities that can be escaped, have been inserted. This method respects
|
217
|
+
# the entity filter set in the constructor.
|
218
|
+
#
|
219
|
+
# # Assume that the entity "s" is defined to be "sean", and that the
|
220
|
+
# # entity "r" is defined to be "russell"
|
221
|
+
# t = Text.new( "< & sean russell", false, nil, false, ['s'] )
|
222
|
+
# t.to_s #-> "< & &s; russell"
|
223
|
+
# t = Text.new( "< & &s; russell", false, nil, false )
|
224
|
+
# t.to_s #-> "< & &s; russell"
|
225
|
+
# u = Text.new( "sean russell", false, nil, true )
|
226
|
+
# u.to_s #-> "sean russell"
|
227
|
+
def to_s
|
228
|
+
return @string if @raw
|
229
|
+
return @normalized if @normalized
|
230
|
+
|
231
|
+
@normalized = Text::normalize( @string, doctype, @entity_filter )
|
232
|
+
end
|
233
|
+
|
234
|
+
def inspect
|
235
|
+
@string.inspect
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string value of this text. This is the text without
|
239
|
+
# entities, as it might be used programmatically, or printed to the
|
240
|
+
# console. This ignores the 'raw' attribute setting, and any
|
241
|
+
# entity_filter.
|
242
|
+
#
|
243
|
+
# # Assume that the entity "s" is defined to be "sean", and that the
|
244
|
+
# # entity "r" is defined to be "russell"
|
245
|
+
# t = Text.new( "< & sean russell", false, nil, false, ['s'] )
|
246
|
+
# t.value #-> "< & sean russell"
|
247
|
+
# t = Text.new( "< & &s; russell", false, nil, false )
|
248
|
+
# t.value #-> "< & sean russell"
|
249
|
+
# u = Text.new( "sean russell", false, nil, true )
|
250
|
+
# u.value #-> "sean russell"
|
251
|
+
def value
|
252
|
+
return @unnormalized if @unnormalized
|
253
|
+
@unnormalized = Text::unnormalize( @string, doctype )
|
254
|
+
end
|
255
|
+
|
256
|
+
# Sets the contents of this text node. This expects the text to be
|
257
|
+
# unnormalized. It returns self.
|
258
|
+
#
|
259
|
+
# e = Element.new( "a" )
|
260
|
+
# e.add_text( "foo" ) # <a>foo</a>
|
261
|
+
# e[0].value = "bar" # <a>bar</a>
|
262
|
+
# e[0].value = "<a>" # <a><a></a>
|
263
|
+
def value=( val )
|
264
|
+
@string = val.gsub( /\r\n?/, "\n" )
|
265
|
+
clear_cache
|
266
|
+
@raw = false
|
267
|
+
end
|
268
|
+
|
269
|
+
def wrap(string, width, addnewline=false)
|
270
|
+
# Recursively wrap string at width.
|
271
|
+
return string if string.length <= width
|
272
|
+
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
273
|
+
if addnewline then
|
274
|
+
return "\n" + string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
275
|
+
else
|
276
|
+
return string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
def indent_text(string, level=1, style="\t", indentfirstline=true)
|
281
|
+
return string if level < 0
|
282
|
+
new_string = ''
|
283
|
+
string.each_line { |line|
|
284
|
+
indent_string = style * level
|
285
|
+
new_line = (indent_string + line).sub(/[\s]+$/,'')
|
286
|
+
new_string << new_line
|
287
|
+
}
|
288
|
+
new_string.strip! unless indentfirstline
|
289
|
+
return new_string
|
290
|
+
end
|
291
|
+
|
292
|
+
# == DEPRECATED
|
293
|
+
# See REXML::Formatters
|
294
|
+
#
|
295
|
+
def write( writer, indent=-1, transitive=false, ie_hack=false )
|
296
|
+
Kernel.warn("#{self.class.name}.write is deprecated. See REXML::Formatters")
|
297
|
+
formatter = if indent > -1
|
298
|
+
REXML::Formatters::Pretty.new( indent )
|
299
|
+
else
|
300
|
+
REXML::Formatters::Default.new
|
301
|
+
end
|
302
|
+
formatter.write( self, writer )
|
303
|
+
end
|
304
|
+
|
305
|
+
# FIXME
|
306
|
+
# This probably won't work properly
|
307
|
+
def xpath
|
308
|
+
path = @parent.xpath
|
309
|
+
path += "/text()"
|
310
|
+
return path
|
311
|
+
end
|
312
|
+
|
313
|
+
# Writes out text, substituting special characters beforehand.
|
314
|
+
# +out+ A String, IO, or any other object supporting <<( String )
|
315
|
+
# +input+ the text to substitute and the write out
|
316
|
+
#
|
317
|
+
# z=utf8.unpack("U*")
|
318
|
+
# ascOut=""
|
319
|
+
# z.each{|r|
|
320
|
+
# if r < 0x100
|
321
|
+
# ascOut.concat(r.chr)
|
322
|
+
# else
|
323
|
+
# ascOut.concat(sprintf("&#x%x;", r))
|
324
|
+
# end
|
325
|
+
# }
|
326
|
+
# puts ascOut
|
327
|
+
def write_with_substitution out, input
|
328
|
+
copy = input.clone
|
329
|
+
# Doing it like this rather than in a loop improves the speed
|
330
|
+
copy.gsub!( SPECIALS[0], SUBSTITUTES[0] )
|
331
|
+
copy.gsub!( SPECIALS[1], SUBSTITUTES[1] )
|
332
|
+
copy.gsub!( SPECIALS[2], SUBSTITUTES[2] )
|
333
|
+
copy.gsub!( SPECIALS[3], SUBSTITUTES[3] )
|
334
|
+
copy.gsub!( SPECIALS[4], SUBSTITUTES[4] )
|
335
|
+
copy.gsub!( SPECIALS[5], SUBSTITUTES[5] )
|
336
|
+
out << copy
|
337
|
+
end
|
338
|
+
|
339
|
+
private
|
340
|
+
def clear_cache
|
341
|
+
@normalized = nil
|
342
|
+
@unnormalized = nil
|
343
|
+
end
|
344
|
+
|
345
|
+
# Reads text, substituting entities
|
346
|
+
def Text::read_with_substitution( input, illegal=nil )
|
347
|
+
copy = input.clone
|
348
|
+
|
349
|
+
if copy =~ illegal
|
350
|
+
raise ParseException.new( "malformed text: Illegal character #$& in \"#{copy}\"" )
|
351
|
+
end if illegal
|
352
|
+
|
353
|
+
copy.gsub!( /\r\n?/, "\n" )
|
354
|
+
if copy.include? ?&
|
355
|
+
copy.gsub!( SETUTITSBUS[0], SLAICEPS[0] )
|
356
|
+
copy.gsub!( SETUTITSBUS[1], SLAICEPS[1] )
|
357
|
+
copy.gsub!( SETUTITSBUS[2], SLAICEPS[2] )
|
358
|
+
copy.gsub!( SETUTITSBUS[3], SLAICEPS[3] )
|
359
|
+
copy.gsub!( SETUTITSBUS[4], SLAICEPS[4] )
|
360
|
+
copy.gsub!( /�*((?:\d+)|(?:x[a-f0-9]+));/ ) {
|
361
|
+
m=$1
|
362
|
+
#m='0' if m==''
|
363
|
+
m = "0#{m}" if m[0] == ?x
|
364
|
+
[Integer(m)].pack('U*')
|
365
|
+
}
|
366
|
+
end
|
367
|
+
copy
|
368
|
+
end
|
369
|
+
|
370
|
+
EREFERENCE = /&(?!#{Entity::NAME};)/
|
371
|
+
# Escapes all possible entities
|
372
|
+
def Text::normalize( input, doctype=nil, entity_filter=nil )
|
373
|
+
copy = input.to_s
|
374
|
+
# Doing it like this rather than in a loop improves the speed
|
375
|
+
#copy = copy.gsub( EREFERENCE, '&' )
|
376
|
+
copy = copy.gsub( "&", "&" )
|
377
|
+
if doctype
|
378
|
+
# Replace all ampersands that aren't part of an entity
|
379
|
+
doctype.entities.each_value do |entity|
|
380
|
+
copy = copy.gsub( entity.value,
|
381
|
+
"&#{entity.name};" ) if entity.value and
|
382
|
+
not( entity_filter and entity_filter.include?(entity.name) )
|
383
|
+
end
|
384
|
+
else
|
385
|
+
# Replace all ampersands that aren't part of an entity
|
386
|
+
DocType::DEFAULT_ENTITIES.each_value do |entity|
|
387
|
+
copy = copy.gsub(entity.value, "&#{entity.name};" )
|
388
|
+
end
|
389
|
+
end
|
390
|
+
copy
|
391
|
+
end
|
392
|
+
|
393
|
+
# Unescapes all possible entities
|
394
|
+
def Text::unnormalize( string, doctype=nil, filter=nil, illegal=nil )
|
395
|
+
sum = 0
|
396
|
+
string.gsub( /\r\n?/, "\n" ).gsub( REFERENCE ) {
|
397
|
+
s = Text.expand($&, doctype, filter)
|
398
|
+
if sum + s.bytesize > Security.entity_expansion_text_limit
|
399
|
+
raise "entity expansion has grown too large"
|
400
|
+
else
|
401
|
+
sum += s.bytesize
|
402
|
+
end
|
403
|
+
s
|
404
|
+
}
|
405
|
+
end
|
406
|
+
|
407
|
+
def Text.expand(ref, doctype, filter)
|
408
|
+
if ref[1] == ?#
|
409
|
+
if ref[2] == ?x
|
410
|
+
[ref[3...-1].to_i(16)].pack('U*')
|
411
|
+
else
|
412
|
+
[ref[2...-1].to_i].pack('U*')
|
413
|
+
end
|
414
|
+
elsif ref == '&'
|
415
|
+
'&'
|
416
|
+
elsif filter and filter.include?( ref[1...-1] )
|
417
|
+
ref
|
418
|
+
elsif doctype
|
419
|
+
doctype.entity( ref[1...-1] ) or ref
|
420
|
+
else
|
421
|
+
entity_value = DocType::DEFAULT_ENTITIES[ ref[1...-1] ]
|
422
|
+
entity_value ? entity_value.value : ref
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|
426
|
+
end
|