<' . esc_attr($firstLevelTag) . '>'
- . esc_html($title) . '' . esc_attr($firstLevelTag) . '>' . ub_convert_to_paragraphs($introduction) . $header .
+ . wp_filter_nohtml_kses($title) . '' . esc_attr($firstLevelTag) . '>' . ub_convert_to_paragraphs($introduction) . $header .
($advancedMode ? ($videoURL === '' ? '' : $videoEmbedCode)
- . '
' . esc_html($costDisplayText) . esc_html($costDisplay) . '
'
+ . '
' . wp_filter_nohtml_kses($costDisplayText) . wp_filter_nohtml_kses($costDisplay) . '
'
. $timeDisplay : '') . $stepsDisplay .
- '
<' . esc_attr($secondLevelTag) . '>' . esc_html($resultIntro) . '' . esc_attr($secondLevelTag) . '>' .
+ '
<' . esc_attr($secondLevelTag) . '>' . wp_filter_nohtml_kses($resultIntro) . '' . esc_attr($secondLevelTag) . '>' .
($finalImageURL === '' ? '' : (!isset($finalImageCaption) || $finalImageCaption === '' ? '' : '
') .
'
' .
- (!isset($finalImageCaption) || $finalImageCaption === '' ? '' : '' . esc_html($finalImageCaption) . '')) .
+ (!isset($finalImageCaption) || $finalImageCaption === '' ? '' : '
' . wp_filter_nohtml_kses($finalImageCaption) . '')) .
ub_convert_to_paragraphs($howToYield) . '
' . $JSONLD;
}
diff --git a/src/blocks/image-slider/block.php b/src/blocks/image-slider/block.php
index 66d4580b..cc8f1a6b 100644
--- a/src/blocks/image-slider/block.php
+++ b/src/blocks/image-slider/block.php
@@ -19,7 +19,7 @@ function ub_render_image_slider_block($attributes){
![' . esc_attr($image['alt']) . '](' . esc_url($image['url']) . ')
' .
'
' . ($captionArray[$key]['link'] === '' ? '' : '')
- . esc_html($captionArray[$key]['text'])
+ . wp_filter_nohtml_kses($captionArray[$key]['text'])
. ($captionArray[$key]['link'] === '' ? '' : '') . ' ';
}
$classes = array( 'ub_image_slider', 'swiper-container' );
diff --git a/src/blocks/notification-box/block.php b/src/blocks/notification-box/block.php
index 99f57aa0..0f9b09bb 100644
--- a/src/blocks/notification-box/block.php
+++ b/src/blocks/notification-box/block.php
@@ -5,7 +5,7 @@ function ub_render_notification_box_block($attributes){
return '
-
'. esc_html($ub_notify_info) .'
+
'. wp_filter_nohtml_kses($ub_notify_info) .'
';
}
diff --git a/src/blocks/number-box/block.php b/src/blocks/number-box/block.php
index 63dc5bc8..7936e02e 100644
--- a/src/blocks/number-box/block.php
+++ b/src/blocks/number-box/block.php
@@ -5,26 +5,26 @@ function ub_render_number_box_block($attributes){
$column1 = '
-
'. esc_html($columnOneNumber) .'
+
'. wp_filter_nohtml_kses($columnOneNumber) .'
-
'. esc_html($columnOneTitle) .'
-
'. esc_html($columnOneBody) .'
+
'. wp_filter_nohtml_kses($columnOneTitle) .'
+
'. wp_filter_nohtml_kses($columnOneBody) .'
';
$column2 = '
-
'. esc_html($columnTwoNumber) .'
+
'. wp_filter_nohtml_kses($columnTwoNumber) .'
-
'. esc_html($columnTwoTitle) .'
-
'. esc_html($columnTwoBody) .'
+
'. wp_filter_nohtml_kses($columnTwoTitle) .'
+
'. wp_filter_nohtml_kses($columnTwoBody) .'
';
$column3 = '
-
-
'. esc_html($columnThreeNumber) .'
+
+
'. wp_filter_nohtml_kses($columnThreeNumber) .'
-
'. esc_html($columnThreeTitle) .'
-
'. esc_html($columnThreeBody) .'
+
'. wp_filter_nohtml_kses($columnThreeTitle) .'
+
'. wp_filter_nohtml_kses($columnThreeBody) .'
';
$columns = $column1;
diff --git a/src/blocks/progress-bar/block.php b/src/blocks/progress-bar/block.php
index 92f4d2a3..ced62e71 100644
--- a/src/blocks/progress-bar/block.php
+++ b/src/blocks/progress-bar/block.php
@@ -52,11 +52,11 @@ function ub_render_progress_bar_block($attributes, $block_content, $block){
$number_suffix = isset($attributes['numberSuffix']) ? $attributes['numberSuffix'] : '%';
$inside_percentage_class = $percentage_position === 'inside' ? " ub_progress-bar-label-inside" : '';
$stripe_style = $is_stripe ? " ub_progress-bar-stripe" : '';
- $detail_text = '
' . esc_html($detail) . '
';
+ $detail_text = '
' . wp_filter_nohtml_kses($detail) . '
';
$percentage_text = '
- ' . esc_html($number_prefix) . '
- ' . esc_html($percentage) . '
- ' . esc_html($number_suffix) . '
+ ' . wp_filter_nohtml_kses($number_prefix) . '
+ ' . wp_filter_nohtml_kses($percentage) . '
+ ' . wp_filter_nohtml_kses($number_suffix) . '
';
$top_percentage = $show_number && $percentage_position === 'top' ?
@@ -77,9 +77,9 @@ function ub_render_progress_bar_block($attributes, $block_content, $block){
' : '';
$circle_percentage = $show_number ? '
- ' . esc_html($number_prefix) . '
- ' . esc_html($percentage) . '
- ' . esc_html($number_suffix) . '
' : '';
+
' . wp_filter_nohtml_kses($number_prefix) . '
+
' . wp_filter_nohtml_kses($percentage) . '
+
' . wp_filter_nohtml_kses($number_suffix) . '' : '';
if(!$is_style_circle && !$is_style_half_circle){
$progressBarPath = 'M' . ($barThickness / 2) . ',' . ($barThickness / 2)
. 'L' . (100 - $barThickness / 2) . ',' . ($barThickness / 2);
diff --git a/src/blocks/review/block.php b/src/blocks/review/block.php
index 7b48acf8..387d93f3 100644
--- a/src/blocks/review/block.php
+++ b/src/blocks/review/block.php
@@ -29,7 +29,7 @@ class="ub_review_percentage_bar_path"
stroke-width="1" stroke-dashoffset="' . (100 - $value) . 'px"
>
-
' . esc_html($value) . '%
+
' . wp_filter_nohtml_kses($value) . '%
';
}
@@ -187,18 +187,18 @@ function ub_render_review_block($attributes, $block_content, $block_instance){
return '
' .
- esc_html($itemName) . '
' . esc_html($authorName) . '
' .
+ wp_filter_nohtml_kses($itemName) . '
' . wp_filter_nohtml_kses($authorName) . '
' .
(($enableImage || $enableDescription) && ($imgURL !== '' || $description !== '') ?
'
' .
(!$enableImage || $imgURL === '' ? '' : '
![' . esc_attr($imgAlt) . '](' . esc_url($imgURL) . ')
') .
- (!$enableDescription || $description === '' ? '' : '
' . esc_html($description) . '
') .
+ (!$enableDescription || $description === '' ? '' : '
' . wp_filter_nohtml_kses($description) . '
') .
'
' : '').
$ratings
.'
' .
- ($useSummary ? '
' . esc_html($summaryTitle) . '
' : '') .
+ ($useSummary ? '
' . wp_filter_nohtml_kses($summaryTitle) . '
' : '') .
'
' .
- ($useSummary ? '
' . esc_html($summaryDescription) . '
' : '') .
+ ($useSummary ? '
' . wp_filter_nohtml_kses($summaryDescription) . '
' : '') .
'
' . $average . ($valueType === 'percent' ? '%':'') . '' .
($valueType === 'star' ? ub_generateStarDisplay($average, $starCount, $blockID . '-average',
$inactiveStarColor, $activeStarColor, $starOutlineColor, "ub_review_average_stars", "ub_review_star_filter-") : '' ).
diff --git a/src/blocks/social-share/block.php b/src/blocks/social-share/block.php
index ed418574..b1bd3fa2 100644
--- a/src/blocks/social-share/block.php
+++ b/src/blocks/social-share/block.php
@@ -67,14 +67,14 @@ function ub_prepare_social_share_icon($icon, $iconShape, $siteName, $link, $capt
' .
$icon .
'' .
- ( $caption ? ('
' . esc_html($caption) . '') : '' ) . '';
+ ( $caption ? ('
' . wp_filter_nohtml_kses($caption) . '') : '' ) . '';
}
else{
return ($caption ? ('
' : '' );
+ ( $caption ? '
' . wp_filter_nohtml_kses($caption) . ' ' : '' );
}
}
diff --git a/src/blocks/star-rating/block.php b/src/blocks/star-rating/block.php
index b2a19ba9..1a25ace0 100644
--- a/src/blocks/star-rating/block.php
+++ b/src/blocks/star-rating/block.php
@@ -25,7 +25,7 @@ function ub_render_star_rating_block($attributes){
'.$stars.'
'.
($reviewText === '' || false === $isShowReviewText ? '' : '
' .
- esc_html($reviewText)
+ wp_filter_nohtml_kses($reviewText)
. '
') .
'
';
}
diff --git a/src/blocks/styled-box/block.php b/src/blocks/styled-box/block.php
index 3ad1645a..5a7dfaec 100644
--- a/src/blocks/styled-box/block.php
+++ b/src/blocks/styled-box/block.php
@@ -19,10 +19,10 @@ function ub_render_styled_box_numbered_box_column($attributes, $content){
extract($attributes);
return '
-
' . esc_html($number) . '
+
' . wp_filter_nohtml_kses($number) . '
-
' . esc_html($title) . '
-
' . esc_html($content) . '
+
' . wp_filter_nohtml_kses($title) . '
+
' . wp_filter_nohtml_kses($content) . '
';
}
@@ -66,15 +66,15 @@ function ub_render_styled_box_block($attributes, $content){
extract($attributes);
$renderedBlock = '';
if($mode === 'notification' && $text[0] != ''){
- $renderedBlock = '
'. esc_html($text[0]) .'
';
+ $renderedBlock = '
'. wp_filter_nohtml_kses($text[0]) .'
';
}
else if($mode === 'feature'){
foreach(range(0, count($text)-1) as $i){
$renderedBlock .= '
'.
($image[$i]['url'] === '' ? '' :
'
![]('. esc_url($image[$i]['url']) .')
').
- '
'. esc_html($title[$i]) .'
-
'. esc_html($text[$i]) .'
+ '
'. wp_filter_nohtml_kses($title[$i]) .'
+
'. wp_filter_nohtml_kses($text[$i]) .'
';
}
}
@@ -84,10 +84,10 @@ function ub_render_styled_box_block($attributes, $content){
foreach(range(0, count($text)-1) as $i){
$renderedBlock .= '
-
'. esc_html($number[$i]) .'
+
'. wp_filter_nohtml_kses($number[$i]) .'
-
'. esc_html($title[$i]) .'
-
'. esc_html($text[$i]) .'
+
'. wp_filter_nohtml_kses($title[$i]) .'
+
'. wp_filter_nohtml_kses($text[$i]) .'
';
}
}
diff --git a/src/blocks/styled-list/block.php b/src/blocks/styled-list/block.php
index dd06edb6..1412bb63 100644
--- a/src/blocks/styled-list/block.php
+++ b/src/blocks/styled-list/block.php
@@ -78,7 +78,7 @@ function ub_makeList($num, $item, $color, $size){
else{
return '
' . esc_html($listItems) . '
';
+ '>
' . wp_filter_nohtml_kses($listItems) . '
';
}
}
@@ -115,7 +115,7 @@ function ub_render_styled_list_item_block($attributes, $contents, $block){
$styles = ub_get_styled_list_item_styles($block_attributes);
- return '' . esc_html($title) . '
';
+ ' . wp_filter_nohtml_kses($title) . '
';
}
$mobileTabStyle = substr($mobileTabDisplay, 0, strlen($mobileTabDisplay) - 3);
diff --git a/src/blocks/table-of-contents/block.php b/src/blocks/table-of-contents/block.php
index 1ff5ca62..df841fde 100644
--- a/src/blocks/table-of-contents/block.php
+++ b/src/blocks/table-of-contents/block.php
@@ -123,7 +123,7 @@ function ub_makeListItem($num, $item, $listStyle, $blockID, $currentGaps){
. ($scrollOption === 'namedelement' ? ' data-scrolltarget="' . $targetType . esc_attr($scrollTarget) . '"' : '') . ' data-initiallyhideonmobile="' . json_encode($hideOnMobile) . '"
data-initiallyshow="' . json_encode($showList) . '">'.
(('