Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/jeg-elementor-kit/class/elements/views/class-client-logo-view.php
+++ b/jeg-elementor-kit/class/elements/views/class-client-logo-view.php
@@ -20,7 +20,10 @@
*/
public function build_content() {
$arrow_position = esc_attr( $this->attribute['sg_setting_arrow_position'] );
- $output = '<div class="client-list"><div class="client-track">' . $this->render_logo() . '</div></div>';
+ $controls = $this->render_navigation();
+ $track = '<div class="client-track">' . $this->render_logo() . '</div>';
+ $controls_first = 'top-left' === $this->attribute['sg_setting_arrow_position'] || 'top-right' === $this->attribute['sg_setting_arrow_position'];
+ $output = '<div class="client-list">' . ( $controls_first ? $controls . $track : $track . $controls ) . '</div>';
return $this->render_wrapper(
'client-logo',
@@ -59,20 +62,11 @@
}
/**
- * Render Option
+ * Render the carousel controls without passing HTML through JavaScript settings.
*/
- private function render_option() {
- $default = array(
- 'dekstop' => array(
- 'items' => 3,
- 'margin' => 10,
- ),
- );
- $responsive = array();
+ private function render_navigation() {
$nav_left = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_setting_arrow_left'] ) );
$nav_right = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_setting_arrow_right'] ) );
- $items = ! empty( $this->attribute['sg_setting_slide_show_responsive']['size'] ) ? $this->attribute['sg_setting_slide_show_responsive']['size'] : $default['dekstop']['items'];
- $margin = ! empty( $this->attribute['sg_setting_margin_responsive']['size'] ) ? $this->attribute['sg_setting_margin_responsive']['size'] : $default['dekstop']['margin'];
if ( 'gradient' === $this->attribute['st_arrow_normal_background_background_background'] || 'gradient' === $this->attribute['st_arrow_hover_background_background_background'] ) {
$icon_class = 'hover-gradient';
@@ -83,6 +77,24 @@
$nav_right = '<span>' . $nav_right . '</span>';
}
+
+ return '<div class="tns-controls"><button type="button">' . $nav_left . '</button><button type="button">' . $nav_right . '</button></div>';
+ }
+
+ /**
+ * Render Option
+ */
+ private function render_option() {
+ $default = array(
+ 'dekstop' => array(
+ 'items' => 3,
+ 'margin' => 10,
+ ),
+ );
+ $responsive = array();
+ $items = ! empty( $this->attribute['sg_setting_slide_show_responsive']['size'] ) ? $this->attribute['sg_setting_slide_show_responsive']['size'] : $default['dekstop']['items'];
+ $margin = ! empty( $this->attribute['sg_setting_margin_responsive']['size'] ) ? $this->attribute['sg_setting_margin_responsive']['size'] : $default['dekstop']['margin'];
+
$prev_key = 'desktop';
$responsive['desktop'] = array(
'items' => $items,
@@ -114,8 +126,6 @@
'autoplay_speed' => intval( $this->attribute['sg_setting_autoplay_speed']['size'] ),
'autoplay_hover_pause' => 'yes' === $this->attribute['sg_setting_autoplay_pause'],
'show_navigation' => 'yes' === $this->attribute['sg_setting_arrow'],
- 'navigation_left' => $nav_left,
- 'navigation_right' => $nav_right,
'show_dots' => 'yes' === $this->attribute['sg_setting_dots'],
'arrow_position' => 'top-left' === $this->attribute['sg_setting_arrow_position'] || 'top-right' === $this->attribute['sg_setting_arrow_position'] ? 'top' : 'bottom',
'responsive' => $responsive,
--- a/jeg-elementor-kit/class/elements/views/class-contact-form-7-view.php
+++ b/jeg-elementor-kit/class/elements/views/class-contact-form-7-view.php
@@ -23,9 +23,14 @@
if ( function_exists( 'wpcf7' ) ) {
$form_id = intval( $this->attribute['sg_setting_contact_form'] );
+
+ if ( class_exists( 'SitePress' ) ) {
+ $form_id = apply_filters( 'wpml_object_id', $form_id, 'wpcf7_contact_form', true );
+ }
+
$form = get_post( $form_id );
- if ( 'wpcf7_contact_form' === $form->post_type ) {
+ if ( $form && 'wpcf7_contact_form' === $form->post_type ) {
$output = $this->render_wrapper( 'contact-form-7', do_shortcode( '[contact-form-7 id="' . $form_id . '"]' ) );
}
}
--- a/jeg-elementor-kit/class/elements/views/class-post-comment-view.php
+++ b/jeg-elementor-kit/class/elements/views/class-post-comment-view.php
@@ -33,13 +33,25 @@
}
ob_start();
+ add_filter( 'comment_text', array( $this, 'protect_comment_shortcodes' ), PHP_INT_MAX );
comments_template();
+ remove_filter( 'comment_text', array( $this, 'protect_comment_shortcodes' ), PHP_INT_MAX );
$content = ob_get_contents();
ob_end_clean();
return $this->render_wrapper( 'post-comment', $content );
}
/**
+ * Keep comment text from being processed as shortcodes in the widget output.
+ *
+ * @param string $text Rendered comment text.
+ * @return string
+ */
+ public function protect_comment_shortcodes( $text ) {
+ return str_replace( array( '[', ']' ), array( '[', ']' ), $text );
+ }
+
+ /**
* Custom Comment Form Fields
*/
public function custom_comment_form_fields( $fields ) {
--- a/jeg-elementor-kit/class/elements/views/class-product-carousel-view.php
+++ b/jeg-elementor-kit/class/elements/views/class-product-carousel-view.php
@@ -61,7 +61,10 @@
*/
public function render_column( $results ) {
$content = $this->build_column( $results );
- $wrapper = '<div class="products jkit-products">' . $content . '</div>';
+ $track = '<div class="products jkit-products">' . $content . '</div>';
+ $controls = $this->render_navigation();
+ $controls_first = 'top-left' === $this->attribute['sg_carousel_arrow_position'] || 'top-right' === $this->attribute['sg_carousel_arrow_position'];
+ $wrapper = $controls_first ? $controls . $track : $track . $controls;
$wrapper = '<div class="woocommerce">' . $wrapper . '</div>';
return $wrapper;
@@ -256,6 +259,16 @@
}
/**
+ * Render carousel navigation.
+ */
+ private function render_navigation() {
+ $nav_left = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_carousel_arrow_left'] ) );
+ $nav_right = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_carousel_arrow_right'] ) );
+
+ return '<div class="tns-controls"><button type="button">' . $nav_left . '</button><button type="button">' . $nav_right . '</button></div>';
+ }
+
+ /**
* Render Option
*/
private function render_option() {
@@ -289,8 +302,6 @@
'margin' => 10,
),
);
- $nav_left = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_carousel_arrow_left'] ) );
- $nav_right = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_carousel_arrow_right'] ) );
$items = ! empty( $this->attribute['sg_carousel_slide_show_responsive']['size'] ) ? $this->attribute['sg_carousel_slide_show_responsive']['size'] : $default['dekstop']['items'];
$margin = ! empty( $this->attribute['sg_carousel_margin_responsive']['size'] ) ? $this->attribute['sg_carousel_margin_responsive']['size'] : $default['dekstop']['margin'];
@@ -325,8 +336,6 @@
'autoplay_speed' => ! empty( $this->attribute['sg_carousel_autoplay_speed']['size'] ) ? intval( $this->attribute['sg_carousel_autoplay_speed']['size'] ) : '',
'autoplay_hover_pause' => 'yes' === $this->attribute['sg_carousel_autoplay_pause'],
'show_navigation' => 'yes' === $this->attribute['sg_carousel_arrow'],
- 'navigation_left' => $nav_left,
- 'navigation_right' => $nav_right,
'show_dots' => 'yes' === $this->attribute['sg_carousel_dots'],
'arrow_position' => 'top-left' === $this->attribute['sg_carousel_arrow_position'] || 'top-right' === $this->attribute['sg_carousel_arrow_position'] ? 'top' : 'bottom',
'responsive' => $responsive,
--- a/jeg-elementor-kit/class/elements/views/class-testimonials-view.php
+++ b/jeg-elementor-kit/class/elements/views/class-testimonials-view.php
@@ -23,10 +23,10 @@
$arrow_position = 'arrow-' . esc_attr( $this->attribute['sg_setting_arrow_position'] );
$layout = esc_attr( $this->attribute['sg_layout_testimonial_choose'] );
- $output =
- '<div class="testimonials-list">
- <div class="testimonials-track">' . $this->render_testimonials() . '</div>
- </div>';
+ $controls = $this->render_navigation();
+ $track = '<div class="testimonials-track">' . $this->render_testimonials() . '</div>';
+ $controls_first = 'top-left' === $this->attribute['sg_setting_arrow_position'] || 'top-right' === $this->attribute['sg_setting_arrow_position'];
+ $output = '<div class="testimonials-list">' . ( $controls_first ? $controls . $track : $track . $controls ) . '</div>';
return $this->render_wrapper(
'testimonials',
@@ -347,6 +347,24 @@
}
/**
+ * Render carousel navigation.
+ */
+ private function render_navigation() {
+ $nav_left = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_setting_arrow_left'] ) );
+ $nav_right = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_setting_arrow_right'] ) );
+
+ if ( 'gradient' === $this->attribute['st_arrow_normal_background_background_background'] || 'gradient' === $this->attribute['st_arrow_hover_background_background_background'] ) {
+ $nav_left = '<span class="hover-gradient">' . $nav_left . '</span>';
+ $nav_right = '<span class="hover-gradient">' . $nav_right . '</span>';
+ } else {
+ $nav_left = '<span>' . $nav_left . '</span>';
+ $nav_right = '<span>' . $nav_right . '</span>';
+ }
+
+ return '<div class="tns-controls"><button type="button">' . $nav_left . '</button><button type="button">' . $nav_right . '</button></div>';
+ }
+
+ /**
* Render Option
*/
private function render_option() {
@@ -381,20 +399,9 @@
'margin' => 10,
),
);
- $nav_left = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_setting_arrow_left'] ) );
- $nav_right = preg_replace( '~[rns]+~', ' ', $this->render_icon_element( $this->attribute['sg_setting_arrow_right'] ) );
$items = ! empty( $this->attribute['sg_setting_slide_show_responsive']['size'] ) ? $this->attribute['sg_setting_slide_show_responsive']['size'] : $default['dekstop']['items'];
$margin = ! empty( $this->attribute['sg_setting_margin_responsive']['size'] ) ? $this->attribute['sg_setting_margin_responsive']['size'] : $default['dekstop']['margin'];
- if ( 'gradient' === $this->attribute['st_arrow_normal_background_background_background'] || 'gradient' === $this->attribute['st_arrow_hover_background_background_background'] ) {
- $icon_class = 'hover-gradient';
- $nav_left = '<span class="' . $icon_class . '">' . $nav_left . '</span>';
- $nav_right = '<span class="' . $icon_class . '">' . $nav_right . '</span>';
- } else {
- $nav_left = '<span>' . $nav_left . '</span>';
- $nav_right = '<span>' . $nav_right . '</span>';
- }
-
if ( isset( $breakpoints[0]['key'] ) && 'widescreen' === $breakpoints[0]['key'] ) {
$responsive[ $breakpoints[0]['key'] ] = array(
'items' => $items,
@@ -451,8 +458,6 @@
'autoplay_speed' => ! empty( $this->attribute['sg_setting_autoplay_speed']['size'] ) ? intval( $this->attribute['sg_setting_autoplay_speed']['size'] ) : '',
'autoplay_hover_pause' => 'yes' === $this->attribute['sg_setting_autoplay_pause'],
'show_navigation' => 'yes' === $this->attribute['sg_setting_arrow'],
- 'navigation_left' => $nav_left,
- 'navigation_right' => $nav_right,
'show_dots' => 'yes' === $this->attribute['sg_setting_dots'],
'arrow_position' => 'top-left' === $this->attribute['sg_setting_arrow_position'] || 'top-right' === $this->attribute['sg_setting_arrow_position'] ? 'top' : 'bottom',
'responsive' => $responsive,
--- a/jeg-elementor-kit/class/elements/views/class-view-abstract.php
+++ b/jeg-elementor-kit/class/elements/views/class-view-abstract.php
@@ -557,8 +557,8 @@
$next_class = $next ? '' : 'disabled';
if ( 'text' === $pagination_button_display ) {
- $prev = isset( $this->attribute['pagination_prev_text'] ) ? $this->attribute['pagination_prev_text'] : '';
- $next = isset( $this->attribute['pagination_next_text'] ) ? $this->attribute['pagination_next_text'] : '';
+ $prev = isset( $this->attribute['pagination_prev_text'] ) ? esc_html( $this->attribute['pagination_prev_text'] ) : '';
+ $next = isset( $this->attribute['pagination_next_text'] ) ? esc_html( $this->attribute['pagination_next_text'] ) : '';
} elseif ( 'icon' === $pagination_button_display ) {
$prev = $this->render_icon_element( $this->attribute['pagination_prev_icon'] );
$next = $this->render_icon_element( $this->attribute['pagination_next_icon'] );
@@ -567,7 +567,7 @@
$class = sprintf(
'jkit-block-%s jkit-nextprev-%s',
$this->attribute['pagination_mode'],
- isset( $this->attribute['pagination_style'] ) ? $this->attribute['pagination_style'] : ''
+ isset( $this->attribute['pagination_style'] ) ? esc_attr( $this->attribute['pagination_style'] ) : ''
);
$output =
--- a/jeg-elementor-kit/jeg-elementor-kit.php
+++ b/jeg-elementor-kit/jeg-elementor-kit.php
@@ -4,14 +4,14 @@
* Plugin URI: https://jegkit.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
* Description: Jeg Kit for Elementor (formerly Jeg Elementor Kit) extends Elementor with powerful, customizable widgets and templates — helping you build modern, responsive WordPress websites faster.
* Requires Plugins: elementor
- * Version: 3.3.1
+ * Version: 3.3.2
* Author: Jegtheme
* Author URI: https://jegkit.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
* License: GPLv3
* Text Domain: jeg-elementor-kit
*
- * Elementor tested up to: 4.3
- * Elementor Pro tested up to: 4.3
+ * Elementor tested up to: 4.4
+ * Elementor Pro tested up to: 4.4
*
* @author Jegtheme
* @since 1.0.0
@@ -20,7 +20,7 @@
defined( 'JEG_ELEMENTOR_KIT' ) || define( 'JEG_ELEMENTOR_KIT', 'jeg-elementor-kit' );
defined( 'JEG_ELEMENTOR_KIT_NAME' ) || define( 'JEG_ELEMENTOR_KIT_NAME', 'Jeg Kit' );
-defined( 'JEG_ELEMENTOR_KIT_VERSION' ) || define( 'JEG_ELEMENTOR_KIT_VERSION', '3.3.1' );
+defined( 'JEG_ELEMENTOR_KIT_VERSION' ) || define( 'JEG_ELEMENTOR_KIT_VERSION', '3.3.2' );
defined( 'JEG_ELEMENTOR_KIT_URL' ) || define( 'JEG_ELEMENTOR_KIT_URL', plugins_url( JEG_ELEMENTOR_KIT ) );
defined( 'JEG_ELEMENTOR_KIT_FILE' ) || define( 'JEG_ELEMENTOR_KIT_FILE', __FILE__ );
defined( 'JEG_ELEMENTOR_KIT_BASE' ) || define( 'JEG_ELEMENTOR_KIT_BASE', plugin_basename( __FILE__ ) );
--- a/jeg-elementor-kit/lib/dependencies/admin.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/admin.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '9fcfb9df2f5567120537');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => 'cfffb0d61f3b3ce14357');
--- a/jeg-elementor-kit/lib/dependencies/core.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/core.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3ec63642a83b4e84f9b9');
+<?php return array('dependencies' => array('react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'a65857491f166c3b2e9e');
--- a/jeg-elementor-kit/lib/dependencies/dashboard.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/dashboard.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'db6b9d6412df19d2dd2c');
+<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '4afaeaa819f6031501de');
--- a/jeg-elementor-kit/lib/dependencies/editor.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/editor.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '63bb7161f1e0a9abb202');
+<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => 'bcc7ac7a5f10bf616850');
--- a/jeg-elementor-kit/lib/dependencies/wizard.asset.php
+++ b/jeg-elementor-kit/lib/dependencies/wizard.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '5ea9a1deb01b32b1649d');
+<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'regenerator-runtime', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'fc281265a5e7d3badd63');
--- a/jeg-elementor-kit/lib/vendor/composer/installed.php
+++ b/jeg-elementor-kit/lib/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'jegstudio/jeg-elementor-kit',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '951b1ee3b80a26eb7a8cad4deb5f9a689059f3c4',
+ 'reference' => '98cc722308287c210fb6bc30349271fb853dabfb',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -31,7 +31,7 @@
'jegstudio/jeg-elementor-kit' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '951b1ee3b80a26eb7a8cad4deb5f9a689059f3c4',
+ 'reference' => '98cc722308287c210fb6bc30349271fb853dabfb',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),