PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
← All changes | core/any/emails_tpl/standard-html-tpl.php +31 -18 10.1.3 → 11.9 View file →
@@ -17,15 +17,24 @@
17 17 *
18 18 * @param array $fields_values
19 19 */
20 20 function wpbc_email_template_standard_html( $fields_values ) {
21 - ob_start();
22 21
23 - $base_color = 'background-color:' . ( empty( $fields_values['base_color'] ) ? '#557da1' : $fields_values['base_color'] ) . ';';
22 + ob_start();
23 +
24 + // FixIn: 10.14.2.2.
25 + $base_color = sanitize_hex_color( $fields_values['base_color'] );
26 + $base_color = 'background-color:' . ( empty( $fields_values['base_color'] ) ? '#557da1' : $fields_values['base_color'] ) . ';';
27 +
28 + $background_color = sanitize_hex_color( $fields_values['background_color'] );
24 29 $background_color = 'background-color:' . ( empty( $fields_values['background_color'] ) ? '#FDFDFD' : $fields_values['background_color'] ) . ';';
25 - $body_color = 'background-color:' . ( empty( $fields_values['body_color'] ) ? '#F5F5F5' : $fields_values['body_color'] ) . ';';
26 - $text_color = 'color:' . ( empty( $fields_values['text_color'] ) ? '#333333' : $fields_values['text_color'] ) . ';';
27 30
31 + $body_color = sanitize_hex_color( $fields_values['body_color'] );
32 + $body_color = 'background-color:' . ( empty( $fields_values['body_color'] ) ? '#F5F5F5' : $fields_values['body_color'] ) . ';';
33 +
34 + $text_color = sanitize_hex_color( $fields_values['text_color'] );
35 + $text_color = 'color:' . ( empty( $fields_values['text_color'] ) ? '#333333' : $fields_values['text_color'] ) . ';';
36 +
28 37 ////////////////////////////////////////////////////////////////////////////////
29 38 // HTML Email Template
30 39 ////////////////////////////////////////////////////////////////////////////////
31 40 ?>
@@ -40,14 +49,14 @@
40 49 body {
41 50 Margin: 0;
42 51 padding: 0;
43 52 min-width: 100%;
44 - <?php echo $background_color; ?>
53 + <?php echo esc_attr( $background_color ); ?>
45 54 }
46 55 table {
47 56 border-spacing: 0;
48 57 font-family: sans-serif;
49 - <?php echo $text_color; ?>
58 + <?php echo esc_attr( $text_color ); ?>
50 59 }
51 60 td {
52 61 padding: 0;
53 62 }
@@ -60,9 +69,9 @@
60 69 -webkit-text-size-adjust: 100%;
61 70 -ms-text-size-adjust: 100%;
62 71 Margin: 0;
63 72 padding: 70px 0 70px 0;
64 - <?php echo $background_color; ?>
73 + <?php echo esc_attr( $background_color ); ?>
65 74 }
66 75 .webkit {
67 76 max-width: 600px;
68 77 }
@@ -75,9 +84,9 @@
75 84 max-width: 600px;
76 85 box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
77 86 border: 1px solid #dcdcdc;
78 87 border-radius: 3px !important;
79 - <?php echo $body_color; ?>
88 + <?php echo esc_attr( $body_color ); ?>
80 89 }
81 90 .full-width-image img {
82 91 width: 100%;
83 92 height: auto;
@@ -88,13 +97,13 @@
88 97 font-weight: bold;
89 98 line-height: 100%;
90 99 vertical-align: middle;
91 100 font-family: Helvetica, Roboto, Arial, sans-serif;
92 - <?php echo $base_color; ?>
101 + <?php echo esc_attr( $base_color ); ?>
93 102 }
94 103 .footer .inner {
95 104 text-align: center;
96 - <?php //echo $base_color; ?>
105 + <?php //echo esc_attr( $base_color ); ?>
97 106 }
98 107 .footer .inner p {
99 108 font-size: 11px;
100 109 }
@@ -226,22 +235,23 @@
226 235 table {border-collapse: collapse !important;}
227 236 </style>
228 237 <![endif]-->
229 238 </head>
230 -<body style="Margin:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;min-width:100%;<?php echo $background_color; ?>" <?php echo is_rtl() ? 'rightmargin="0"' : 'leftmargin="0"'; ?> >
231 - <center class="wrapper" style="width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;Margin:0;padding-top:70px;padding-bottom:70px;padding-right:0;padding-left:0;<?php echo $background_color; ?>" <?php echo is_rtl() ? 'dir="rtl"' : 'dir="ltr"'?> >
239 +<body style="Margin:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;min-width:100%;<?php echo esc_attr( $background_color ); ?>" <?php echo is_rtl() ? 'rightmargin="0"' : 'leftmargin="0"'; ?> >
240 + <center class="wrapper" style="width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;Margin:0;padding-top:70px;padding-bottom:70px;padding-right:0;padding-left:0;<?php echo esc_attr( $background_color ); ?>" <?php echo is_rtl() ? 'dir="rtl"' : 'dir="ltr"'?> >
232 241 <div class="webkit" style="max-width:600px;" >
233 242 <!--[if (gte mso 9)|(IE)]>
234 - <table width="600" align="center" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?>" >
243 + <table width="600" align="center" style="border-spacing:0;font-family:sans-serif;<?php echo esc_attr( $text_color ); ?>" >
235 244 <tr>
236 245 <td style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" >
237 246 <![endif]-->
238 - <table class="outer" align="center" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?><?php echo $body_color; ?>Margin:0 auto;width:96%;max-width:600px;box-shadow:0 1px 4px rgba(0,0,0,0.1) !important;border-width:1px;border-style:solid;border-color:#dcdcdc;border-radius:3px !important;" >
247 + <table class="outer" align="center" style="border-spacing:0;font-family:sans-serif;<?php echo esc_attr( $text_color ); ?><?php echo esc_attr( $body_color ); ?>Margin:0 auto;width:96%;max-width:600px;box-shadow:0 1px 4px rgba(0,0,0,0.1) !important;border-width:1px;border-style:solid;border-color:#dcdcdc;border-radius:3px !important;" >
239 248 <?php if ( ! empty( $fields_values['header_img600_src'] ) ) { ?>
240 249 <!-- Header IMG: 1 column template row -->
241 250 <tr> <!-- This image must be 600px width (NOT wider). If less, then we need to set in CSS width in px of this image -->
242 251 <td class="full-width-image" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" >
243 - <img src="images/header.jpg" alt="" style="border-width:0;width:100%;height:auto;" /> <!-- src="<?php $fields_values['header_img600_src']; ?>" -->
252 + <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage ?>
253 + <img src="images/header.jpg" alt="" style="border-width:0;width:100%;height:auto;" /> <!-- src="<?php $fields_values['header_img600_src']; ?>" -->
244 254 </td>
245 255 </tr>
246 256 <?php } ?>
247 257 <!-- Header: 1 column template row -->
@@ -246,9 +256,9 @@
246 256 <?php } ?>
247 257 <!-- Header: 1 column template row -->
248 258 <tr>
249 259 <td class="one-column" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" >
250 - <table width="100%" class="header" style="<?php echo $base_color; ?>border-spacing:0;border-radius:3px 3px 0 0 !important;color:#ffffff;border-bottom-width:0;font-weight:bold;line-height:100%;vertical-align:middle;font-family:Helvetica, Roboto, Arial, sans-serif;" >
260 + <table width="100%" class="header" style="<?php echo esc_attr( $base_color ); ?>border-spacing:0;border-radius:3px 3px 0 0 !important;color:#ffffff;border-bottom-width:0;font-weight:bold;line-height:100%;vertical-align:middle;font-family:Helvetica, Roboto, Arial, sans-serif;" >
251 261 <tr>
252 262 <td class="inner" style="padding-top:10px;padding-bottom:10px;padding-right:10px;padding-left:10px;width:100%;" >
253 263 <p class="h1" style="Margin-bottom:10px;color:#ffffff;display:block;font-family:Helvetica, Roboto, Arial, sans-serif;font-size:30px;font-weight:300;line-height:150%;Margin:0;padding-top:26px;padding-bottom:26px;padding-right:48px;padding-left:48px;text-align:left;text-shadow:0 1px 0 #7797b4;-webkit-font-smoothing:antialiased;" ><?php echo ( wp_kses_post( wptexturize( $fields_values['header_content'] ) ) ); ?></p>
254 264 </td>
@@ -258,9 +268,9 @@
258 268 </tr>
259 269 <!-- Content: 1 column template row -->
260 270 <tr>
261 271 <td class="one-column" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" >
262 - <table width="100%" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?>" >
272 + <table width="100%" style="border-spacing:0;font-family:sans-serif;<?php echo esc_attr( $text_color ); ?>" >
263 273 <tr>
264 274 <td class="inner contents" style="padding-top:48px;padding-bottom:48px;padding-right:48px;padding-left:48px;width:100%;text-align:left;" >
265 275 <p style="Margin:0;font-size:14px;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;color:#737373;" ><?php
266 276
@@ -276,9 +286,9 @@
276 286 </tr>
277 287 <!-- Footer: 1 column template row -->
278 288 <tr>
279 289 <td class="one-column" style="padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" >
280 - <table width="100%" class="footer" style="border-spacing:0;font-family:sans-serif;<?php echo $text_color; ?>" >
290 + <table width="100%" class="footer" style="border-spacing:0;font-family:sans-serif;<?php echo esc_attr( $text_color ); ?>" >
281 291 <tr>
282 292 <td class="inner" style="text-align:center;padding-top:10px;padding-bottom:10px;padding-right:48px;padding-left:48px;width:100%;border-top-width:1px;border-top-style:solid;border-top-color:#dddddd;" >
283 293 <p style="Margin:0;Margin-bottom:10px;font-family:Helvetica, Roboto, Arial, sans-serif;line-height:150%;color:#737373;font-size:11px;" >
284 294 <?php /* <a style="color:#ee6a56;text-decoration:underline;" >Forward to a Friend</a> &nbsp; &nbsp; <a style="color:#ee6a56;text-decoration:underline;" >Unsubscribe</a> &nbsp; &nbsp; <a style="color:#ee6a56;text-decoration:underline;" >Preferences</a><br /> */
@@ -526,8 +536,9 @@
526 536 <!-- <?php if ( ! empty( $fields_values['header_img600_src'] ) ) { ?> -->
527 537 <!-- Header IMG: 1 column template row -->
528 538 <tr> <!-- This image must be 600px width (NOT wider). If less, then we need to set in CSS width in px of this image -->
529 539 <td class="full-width-image">
540 + <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage ?>
530 541 <img src="images/header.jpg" alt="" /> <!-- src="<?php $fields_values['header_img600_src']; ?>" -->
531 542 </td>
532 543 </tr>
533 544 <!-- <?php } ?> -->
@@ -576,8 +587,9 @@
576 587 <!-- <?php if ( ! empty( $fields_values['header_column_1_img260_src'] ) ) { ?> -->
577 588 <tr>
578 589 <td>
579 590 <!-- width of image must be 260px -->
591 + <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage ?>
580 592 <img src="images/two-column-01.jpg" alt="" /> <!-- src="<?php $fields_values['header_column_1_img260_src']; ?>" -->
581 593 </td>
582 594 </tr>
583 595 <!-- <?php } ?> -->
@@ -603,8 +615,9 @@
603 615 <!-- <?php if ( ! empty( $fields_values['header_column_2_img260_src'] ) ) { ?> -->
604 616 <tr>
605 617 <td>
606 618 <!-- width of image must be 260px -->
619 + <?php // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage ?>
607 620 <img src="images/two-column-02.jpg" alt="" /> <!-- src="<?php $fields_values['header_column_2_img260_src']; ?>" -->
608 621 </td>
609 622 </tr>
610 623 <!-- <?php } ?> -->