Skip to content

Commit 495172e

Browse files
fix: description escaping
1 parent 01eaa69 commit 495172e

File tree

3 files changed

+80
-7
lines changed

3 files changed

+80
-7
lines changed

templates/frontend/inputs/divider.php

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,18 @@
103103
if ( $divider_styles == 'style1' ) {
104104
if ( $fm->field_label() ) {
105105
?>
106-
<h2 class="ppom-divider-with-txt ppom-divider-line ppom-divider-line-clr ppom-divider-txt"><?php echo esc_html( $fm->field_label() ); ?></h2>
106+
<h2 class="ppom-divider-with-txt ppom-divider-line ppom-divider-line-clr ppom-divider-txt">
107+
<?php
108+
echo wp_kses(
109+
$fm->field_label(),
110+
array(
111+
'span' => array(
112+
'class' => true,
113+
),
114+
)
115+
);
116+
?>
117+
</h2>
107118
<?php } else { ?>
108119
<hr class="ppom-divider-<?php echo esc_attr( $style1_border ); ?>">
109120
<?php
@@ -113,27 +124,71 @@
113124

114125
<!--Style 2-->
115126
<?php if ( $divider_styles == 'style2' ) { ?>
116-
<h2 class="ppom-divider-with-txt ppom-divider-gradient ppom-divider-txt"><?php echo esc_html( $fm->field_label() ); ?></h2>
127+
<h2 class="ppom-divider-with-txt ppom-divider-gradient ppom-divider-txt">
128+
<?php
129+
echo wp_kses(
130+
$fm->field_label(),
131+
array(
132+
'span' => array(
133+
'class' => true,
134+
),
135+
)
136+
);
137+
?>
138+
</h2>
117139
<?php } ?>
118140

119141
<!--Style 3-->
120142
<?php if ( $divider_styles == 'style3' ) { ?>
121-
<h2 class="ppom-divider-with-txt ppom-divider-donotcross ppom-divider-txt"><?php echo esc_html( $fm->field_label() ); ?></h2>
143+
<h2 class="ppom-divider-with-txt ppom-divider-donotcross ppom-divider-txt">
144+
<?php
145+
echo wp_kses(
146+
$fm->field_label(),
147+
array(
148+
'span' => array(
149+
'class' => true,
150+
),
151+
)
152+
);
153+
?>
154+
</h2>
122155
<?php } ?>
123156

124157
<!--Style 4-->
125158
<?php if ( $divider_styles == 'style4' ) { ?>
126159
<div class="ppom-divider-easy-shadow">
127160
<span></span>
128-
<span class="ppom-divider-txt"><?php echo esc_html( $fm->field_label() ); ?></span>
161+
<span class="ppom-divider-txt">
162+
<?php
163+
echo wp_kses(
164+
$fm->field_label(),
165+
array(
166+
'span' => array(
167+
'class' => true,
168+
),
169+
)
170+
);
171+
?>
172+
</span>
129173
<span></span>
130174
</div>
131175
<?php } ?>
132176

133177
<!--Style 5-->
134178
<?php if ( $divider_styles == 'style5' ) { ?>
135179

136-
<h1 class="ppom-divider-fancy-heading ppom-divider-txt"><?php echo esc_html( $fm->field_label() ); ?></h1>
180+
<h1 class="ppom-divider-fancy-heading ppom-divider-txt">
181+
<?php
182+
echo wp_kses(
183+
$fm->field_label(),
184+
array(
185+
'span' => array(
186+
'class' => true,
187+
),
188+
)
189+
);
190+
?>
191+
</h1>
137192
<div class="ppom-divider-fancy-line">
138193
<span></span>
139194
</div>

templates/frontend/inputs/quantities.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,16 @@
5151
class="<?php echo esc_attr( $fm->label_classes() ); ?>"
5252
for="<?php echo esc_attr( $fm->data_name() ); ?>"
5353
>
54-
<?php echo esc_html( $fm->field_label() ); ?>
54+
<?php
55+
echo wp_kses(
56+
$fm->field_label(),
57+
array(
58+
'span' => array(
59+
'class' => true,
60+
),
61+
)
62+
);
63+
?>
5564
</label>
5665
<?php endif ?>
5766

templates/frontend/inputs/text.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,16 @@
5454
class="<?php echo esc_attr( $fm->label_classes() ); ?>"
5555
for="<?php echo esc_attr( $fm->data_name() ); ?>"
5656
>
57-
<?php echo esc_html( $fm->field_label() ); ?>
57+
<?php
58+
echo wp_kses(
59+
$fm->field_label(),
60+
array(
61+
'span' => array(
62+
'class' => true,
63+
),
64+
)
65+
);
66+
?>
5867
</label>
5968
<?php endif ?>
6069

0 commit comments

Comments
 (0)