diff --git a/assets/src/js/lib/utilities.js b/assets/src/js/lib/utilities.js index 8c600e5e0e..97a022477b 100644 --- a/assets/src/js/lib/utilities.js +++ b/assets/src/js/lib/utilities.js @@ -51,7 +51,7 @@ window.jQuery(document).ready(function($) { .addClass('is-loading'); }, success: function(data) { - if (data.success) { + if (data.success || data.status_code === 200) { if (del) { $('#' + del).fadeOut(function() { $(this).remove(); diff --git a/classes/Assets.php b/classes/Assets.php index 7a7b5ebc5d..d0dd3dba73 100644 --- a/classes/Assets.php +++ b/classes/Assets.php @@ -291,7 +291,7 @@ public function admin_scripts( $slug ) { * @return void */ public function frontend_scripts() { - $load_legacy_scripts = $this->should_load_legacy_scripts(); + $load_legacy_scripts = self::should_load_legacy_scripts(); if ( ! $load_legacy_scripts ) { return; } @@ -450,7 +450,7 @@ public function modify_localize_data( $localize_data ) { * @return void */ public function common_scripts( $slug ) { - if ( ! $this->should_load_legacy_scripts() ) { + if ( ! self::should_load_legacy_scripts() ) { return; } @@ -802,7 +802,7 @@ public static function add_frontend_editor_button() { * @return void */ public function enqueue_scripts() { - if ( $this->should_load_legacy_scripts() ) { + if ( self::should_load_legacy_scripts() ) { return; } @@ -862,7 +862,7 @@ public function enqueue_scripts() { * * @return boolean */ - public function should_load_legacy_scripts(): bool { + public static function should_load_legacy_scripts(): bool { $load = true; $post_id = get_the_ID(); diff --git a/classes/Input.php b/classes/Input.php index cbc76401c9..d412f6716e 100644 --- a/classes/Input.php +++ b/classes/Input.php @@ -380,6 +380,7 @@ public static function allow_iframe( $tags, $context ) { public static function allow_svg( $allowed_tags ) { $svg_tags = array( 'svg' => array( + 'id' => true, 'class' => true, 'aria-hidden' => true, 'aria-label' => true, @@ -389,12 +390,17 @@ public static function allow_svg( $allowed_tags ) { 'height' => true, 'viewbox' => true, 'fill' => true, + 'style' => true, ), 'g' => array( - 'fill' => true, - 'opacity' => true, + 'id' => true, + 'fill' => true, + 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'path' => array( + 'id' => true, 'd' => true, 'fill' => true, 'stroke' => true, @@ -406,8 +412,11 @@ public static function allow_svg( $allowed_tags ) { 'fill-rule' => true, 'clip-rule' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'circle' => array( + 'id' => true, 'cx' => true, 'cy' => true, 'r' => true, @@ -419,8 +428,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'rect' => array( + 'id' => true, 'x' => true, 'y' => true, 'width' => true, @@ -434,8 +446,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dashoffset' => true, 'opacity' => true, 'rx' => true, + 'transform' => true, + 'style' => true, ), 'line' => array( + 'id' => true, 'x1' => true, 'x2' => true, 'y1' => true, @@ -447,8 +462,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'polyline' => array( + 'id' => true, 'points' => true, 'fill' => true, 'stroke' => true, @@ -458,8 +476,11 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, ), 'polygon' => array( + 'id' => true, 'points' => true, 'fill' => true, 'stroke' => true, @@ -469,6 +490,48 @@ public static function allow_svg( $allowed_tags ) { 'stroke-dasharray' => true, 'stroke-dashoffset' => true, 'opacity' => true, + 'transform' => true, + 'style' => true, + ), + 'defs' => array(), + 'lineargradient' => array( + 'id' => true, + 'x1' => true, + 'y1' => true, + 'x2' => true, + 'y2' => true, + 'gradientunits' => true, + 'gradienttransform' => true, + 'spreadmethod' => true, + 'xlink:href' => true, + ), + 'radialgradient' => array( + 'id' => true, + 'cx' => true, + 'cy' => true, + 'r' => true, + 'fx' => true, + 'fy' => true, + 'gradientunits' => true, + 'gradienttransform' => true, + 'spreadmethod' => true, + 'xlink:href' => true, + ), + 'stop' => array( + 'offset' => true, + 'stop-color' => true, + 'stop-opacity' => true, + ), + 'clippath' => array( + 'id' => true, + ), + 'use' => array( + 'id' => true, + 'x' => true, + 'y' => true, + 'width' => true, + 'height' => true, + 'xlink:href' => true, ), ); diff --git a/templates/dashboard/registration.php b/templates/dashboard/registration.php index 5470c4f7b1..9a831b3ca4 100644 --- a/templates/dashboard/registration.php +++ b/templates/dashboard/registration.php @@ -33,11 +33,11 @@ tutor_load_template( 'feature_disabled', $args ); ?> -