From 6615e4a989ebf9a9b7760739a519a0c371b278a0 Mon Sep 17 00:00:00 2001 From: Brian Hogg Date: Tue, 17 Sep 2024 09:22:56 -0400 Subject: [PATCH 1/3] Fix sale pricing with strikethrough and other HTML (#2763) * Adding additional tags to the price HTML. --- .changelogs/fix_woocommerce-sale-pricing.yml | 5 +++ class-lifterlms.php | 39 ++++++++------------ 2 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 .changelogs/fix_woocommerce-sale-pricing.yml diff --git a/.changelogs/fix_woocommerce-sale-pricing.yml b/.changelogs/fix_woocommerce-sale-pricing.yml new file mode 100644 index 0000000000..b044721573 --- /dev/null +++ b/.changelogs/fix_woocommerce-sale-pricing.yml @@ -0,0 +1,5 @@ +significance: patch +type: fixed +links: + - "#2762" +entry: Fix for pricing display with additional formatting. diff --git a/class-lifterlms.php b/class-lifterlms.php index 1f45827bcc..ac4cbeaf2c 100644 --- a/class-lifterlms.php +++ b/class-lifterlms.php @@ -143,29 +143,6 @@ private function define_constants() { define( 'LLMS_ASSETS_VERSION', ( $script_debug || $wp_debug ) ? time() : $this->version ); } - // For use in escaping and sanitizing. - llms_maybe_define_constant( - 'LLMS_ALLOWED_HTML_PRICES', - array( - 'div' => array( - 'class' => array(), - 'id' => array(), - ), - 'span' => array( - 'class' => array(), - 'id' => array(), - ), - 'strong' => array( - 'class' => array(), - 'id' => array(), - ), - 'sup' => array( - 'class' => array(), - 'id' => array(), - ), - ) - ); - $allowed_atts = array( 'label' => true, 'align' => true, @@ -274,6 +251,21 @@ private function define_constants() { 'sandbox' => true, 'sizes' => true, ); + + // For use in escaping and sanitizing. + llms_maybe_define_constant( + 'LLMS_ALLOWED_HTML_PRICES', + array( + 'div' => $allowed_atts, + 'span' => $allowed_atts, + 'strong' => $allowed_atts, + 'sup' => $allowed_atts, + 'del' => $allowed_atts, + 'ins' => $allowed_atts, + 'em' => $allowed_atts, + 'bdi' => $allowed_atts, + ) + ); llms_maybe_define_constant( 'LLMS_ALLOWED_HTML_FORM_FIELDS', array( @@ -283,6 +275,7 @@ private function define_constants() { 'article' => $allowed_atts, 'b' => $allowed_atts, 'bdo' => $allowed_atts, + 'bdi' => $allowed_atts, 'blockquote' => $allowed_atts, 'br' => $allowed_atts, 'cite' => $allowed_atts, From 3127b95f4f8eb20398364fa0701ecfd42cfea186 Mon Sep 17 00:00:00 2001 From: Brian Hogg Date: Tue, 17 Sep 2024 09:50:52 -0400 Subject: [PATCH 2/3] Update blocks to 2.5.8 (#2760) --- .changelogs/chore_update-blocks-258.yml | 4 ++++ composer.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changelogs/chore_update-blocks-258.yml diff --git a/.changelogs/chore_update-blocks-258.yml b/.changelogs/chore_update-blocks-258.yml new file mode 100644 index 0000000000..b505120456 --- /dev/null +++ b/.changelogs/chore_update-blocks-258.yml @@ -0,0 +1,4 @@ +significance: patch +type: fixed +entry: Update version of the Blocks library to avoid having an unsaved changes + prompt appear after updating an access plan on a course. diff --git a/composer.json b/composer.json index 9ed0417120..78ec050bbb 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "php": ">=7.4", "composer/installers": "~1.9.0", "deliciousbrains/wp-background-processing": "1.0.2", - "lifterlms/lifterlms-blocks": "2.5.7", + "lifterlms/lifterlms-blocks": "2.5.8", "lifterlms/lifterlms-cli": "0.0.4", "lifterlms/lifterlms-helper": "3.5.4", "lifterlms/lifterlms-rest": "1.0.2", From 25b9ab2a393f353cf6595aef5ac6dd6fcdafcb04 Mon Sep 17 00:00:00 2001 From: Brian Hogg Date: Tue, 17 Sep 2024 10:59:10 -0400 Subject: [PATCH 3/3] Build for 7.7.8. --- .changelogs/chore_update-blocks-258.yml | 4 ---- .changelogs/fix_woocommerce-sale-pricing.yml | 5 ----- CHANGELOG.md | 9 +++++++++ class-lifterlms.php | 2 +- lifterlms.php | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 .changelogs/chore_update-blocks-258.yml delete mode 100644 .changelogs/fix_woocommerce-sale-pricing.yml diff --git a/.changelogs/chore_update-blocks-258.yml b/.changelogs/chore_update-blocks-258.yml deleted file mode 100644 index b505120456..0000000000 --- a/.changelogs/chore_update-blocks-258.yml +++ /dev/null @@ -1,4 +0,0 @@ -significance: patch -type: fixed -entry: Update version of the Blocks library to avoid having an unsaved changes - prompt appear after updating an access plan on a course. diff --git a/.changelogs/fix_woocommerce-sale-pricing.yml b/.changelogs/fix_woocommerce-sale-pricing.yml deleted file mode 100644 index b044721573..0000000000 --- a/.changelogs/fix_woocommerce-sale-pricing.yml +++ /dev/null @@ -1,5 +0,0 @@ -significance: patch -type: fixed -links: - - "#2762" -entry: Fix for pricing display with additional formatting. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fba3530cf..17ee99111a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ LifterLMS Changelog =================== +v7.7.8 - 2024-09-17 +------------------- + +##### Bug Fixes + ++ Update version of the Blocks library to avoid having an unsaved changes prompt appear after updating an access plan on a course. ++ Fix for pricing display with additional formatting. [#2762](https://github.com/gocodebox/lifterlms/issues/2762) + + v7.7.7 - 2024-09-12 ------------------- diff --git a/class-lifterlms.php b/class-lifterlms.php index ac4cbeaf2c..4977c20dc0 100644 --- a/class-lifterlms.php +++ b/class-lifterlms.php @@ -34,7 +34,7 @@ final class LifterLMS { * * @var string */ - public $version = '7.7.7'; + public $version = '7.7.8'; /** * LLMS_Assets instance diff --git a/lifterlms.php b/lifterlms.php index 8bc7530413..917edcc92c 100644 --- a/lifterlms.php +++ b/lifterlms.php @@ -10,7 +10,7 @@ * Plugin Name: LifterLMS * Plugin URI: https://lifterlms.com/ * Description: Complete e-learning platform to sell online courses, protect lessons, offer memberships, and quiz students. WP Learning Management System. - * Version: 7.7.7 + * Version: 7.7.8 * Author: LifterLMS * Author URI: https://lifterlms.com/ * Text Domain: lifterlms diff --git a/package-lock.json b/package-lock.json index c5670f468a..2127bc49ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "lifterlms", - "version": "7.7.7", + "version": "7.7.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lifterlms", - "version": "7.7.7", + "version": "7.7.8", "license": "GPL-3.0", "dependencies": { "@babel/core": "^7.16.5", diff --git a/package.json b/package.json index 1ce6cff68f..d355e20209 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lifterlms", - "version": "7.7.7", + "version": "7.7.8", "description": "LifterLMS by codeBOX", "repository": { "type": "git",