diff --git a/geodirectory.php b/geodirectory.php
index 5fad114e..82e004c9 100644
--- a/geodirectory.php
+++ b/geodirectory.php
@@ -11,7 +11,7 @@
* Plugin Name: GeoDirectory
* Plugin URI: https://wpgeodirectory.com/
* Description: GeoDirectory - Business Directory Plugin for WordPress.
- * Version: 2.3.48
+ * Version: 2.3.49
* Author: AyeCode - WordPress Business Directory Plugins
* Author URI: https://wpgeodirectory.com
* Text Domain: geodirectory
@@ -34,7 +34,7 @@ final class GeoDirectory {
*
* @var string
*/
- public $version = '2.3.48';
+ public $version = '2.3.49';
/**
* GeoDirectory instance.
diff --git a/includes/api/class-geodir-rest-post-tags-controller.php b/includes/api/class-geodir-rest-post-tags-controller.php
index ce7bbe0d..41f6403c 100644
--- a/includes/api/class-geodir-rest-post-tags-controller.php
+++ b/includes/api/class-geodir-rest-post-tags-controller.php
@@ -39,14 +39,14 @@ public function prepare_item_for_response( $item, $request ) {
if ( ! empty( $schema['properties']['id'] ) ) {
$data['id'] = (int) $item->term_id;
}
-
+
if ( ! empty( $schema['properties']['name'] ) ) {
$data['name'] = $item->name;
}
if ( ! empty( $schema['properties']['slug'] ) ) {
$data['slug'] = $item->slug;
- }
+ }
if ( ! empty( $schema['properties']['taxonomy'] ) ) {
$data['taxonomy'] = $this->taxonomy;
diff --git a/includes/class-geodir-ajax.php b/includes/class-geodir-ajax.php
index 6388c1f2..8d1970f3 100644
--- a/includes/class-geodir-ajax.php
+++ b/includes/class-geodir-ajax.php
@@ -222,25 +222,25 @@ public static function manual_map() {
echo geodir_get_template_html( $template, $tmpl_args );
} else {
- echo "";
+ echo "";
include_once( GEODIRECTORY_PLUGIN_DIR . 'templates/map.php' );
}
?>
-
-
+
+
+ onclick="if(jQuery('#').val()==''){alert('');}else{jQuery(window).triggerHandler('', [jQuery('#').val(), jQuery('#').val()]);}">
+ onclick="if(jQuery('#').val()==''){alert('');}else{jQuery(window).triggerHandler('', [jQuery('#').val(), jQuery('#').val()]);}">
output_html( $widget_args, $instance );
diff --git a/includes/widgets/class-geodir-widget-page-title.php b/includes/widgets/class-geodir-widget-page-title.php
index 866266fe..cfa58b51 100644
--- a/includes/widgets/class-geodir-widget-page-title.php
+++ b/includes/widgets/class-geodir-widget-page-title.php
@@ -217,19 +217,12 @@ public function output( $instance = array(), $args = array(), $content = '' ) {
$instance['font_size_class'] = 'h1';
}
+ // sanitize tag
+ $instance['tag'] = in_array( $instance['tag'], array( 'h1', 'h2', 'h3', 'div' ), true ) ? esc_attr( $instance['tag'] ) : 'h1';
+
$design_style = geodir_design_style();
$block_preview = $this->is_block_content_call();
$output = '';
-// if ( $this->is_preview() ) {
-// return $output;
-// }
-
- // No GD page
-// if ( ! geodir_is_geodir_page() && !$block_preview ) {
-// return;
-// }
-
-
// Title container class
$container_class = 'geodir-page-title-wrap geodir-page-title-' . sanitize_html_class( $instance['tag'] );
diff --git a/includes/widgets/class-geodir-widget-single-tabs.php b/includes/widgets/class-geodir-widget-single-tabs.php
index 2c7fb847..f0fdc575 100644
--- a/includes/widgets/class-geodir-widget-single-tabs.php
+++ b/includes/widgets/class-geodir-widget-single-tabs.php
@@ -323,6 +323,10 @@ public function output( $args = array(), $widget_args = array(), $content = '' )
*/
$args = wp_parse_args( $args, $defaults );
+ // sanitize heading_tag
+ $allowed_tags = array( 'h2', 'h3', 'h4' );
+ $args['heading_tag'] = in_array( $args['heading_tag'], $allowed_tags, true ) ? esc_attr( $args['heading_tag'] ) : 'h2';
+
// Check if we have been here before
$tabs_array = ! empty( $gd_single_tabs_array ) ? $gd_single_tabs_array : array();
diff --git a/readme.txt b/readme.txt
index 18b2b11e..c314c691 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Donate link: https://wpgeodirectory.com
Tags: business directory, listings, directory plugin, classifieds, directory
Requires at least: 4.5
Tested up to: 6.5
-Stable tag: 2.3.48
+Stable tag: 2.3.49
Requires PHP: 5.6
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -306,6 +306,9 @@ We don't offer free trials, but we have a 30-day money-back guarantee if you are
__WARNING: GDv2 is a significant update over GDv1 and may require manual work, such as adding widgets to sidebars to recreate your current layout. As always, we recommend trying this on a staging site first. [Learn more](https://docs.wpgeodirectory.com/article/260-upgrading-from-gdv1-to-gdv2)__
+= GeoDirectory v2.3.49 - 2024-04-15 =
+* Extra sanitization for shortcode tag selectors, contributor+ user with details template access could potentially output JS code - FIXED/SECURITY
+
= GeoDirectory v2.3.48 - 2024-04-11 =
* UK regions can sometime contain "Council", we now remove this by default - CHANGED
* SD and AUI packages updated to latest - UPDATED