PluginProbe
Booking Calendar / 11.8.2
Booking Calendar v11.8.2
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 10.11 10.11.2 10.11.3 All 202 releases
← All changes | includes/_functions/sanitizing.php +16 -13 10.1111.8.2 View file →
@@ -473,13 +473,14 @@
473 473 * wpbc_clean_digit_or_csd( '10a' ) => '10
474 474 * or
475 475 * wpbc_clean_digit_or_csd( array( '12,a,45,9', '10a' ) ) => array ( '12,0,45,9', '10' )
476 476 */
477 -function wpbc_clean_digit_or_csd( $value ) { // FixIn: 6.2.1.4.
477 +function wpbc_clean_digit_or_csd( $value ) {
478 478
479 - if ( $value === '' ) return $value;
479 + if ( '' === $value ) {
480 + return $value;
481 + }
480 482
481 -
482 483 if ( is_array( $value ) ) {
483 484 foreach ( $value as $key => $check_value ) {
484 485 $value[ $key ] = wpbc_clean_digit_or_csd( $check_value );
485 486 }
@@ -487,16 +488,16 @@
487 488 }
488 489
489 490 $value = str_replace( ';', ',', $value );
490 491
491 - $array_of_nums = explode(',', $value);
492 + $array_of_nums = explode( ',', $value );
492 493
493 494 $result = array();
494 - foreach ($array_of_nums as $check_element) {
495 + foreach ( $array_of_nums as $check_element ) {
496 + $result[] = intval( $check_element ); // FixIn: 8.0.2.10.
497 + }
498 + $result = implode( ',', $result );
495 499
496 - $result[] = intval( $check_element ); // FixIn: 8.0.2.10.
497 - }
498 - $result = implode(',', $result );
499 500 return $result;
500 501 }
501 502
502 503
@@ -745,9 +746,9 @@
745 746 * @param array $attr
746 747 *
747 748 * @return array
748 749 */
749 -function wpbc_escape_shortcode_params( $attr ) { //FixIn: 9.7.3.6.1
750 +function wpbc_escape_shortcode_params( $attr ) {
750 751
751 752 if ( is_array( $attr ) ) {
752 753
753 754 $scaped_attr = array();
@@ -752,18 +753,20 @@
752 753
753 754 $scaped_attr = array();
754 755
755 756 foreach ( $attr as $attr_key => $attr_val ) {
756 - $attr_key = esc_attr( $attr_key );
757 - $attr_val = esc_attr( $attr_val );
757 + $attr_key = sanitize_text_field( $attr_key ); // FixIn: 10.11.2.1.
758 + $attr_val = sanitize_text_field( $attr_val ); // FixIn: 10.11.2.1.
759 +
758 760 $scaped_attr[ $attr_key ] = $attr_val;
759 761 }
762 +
760 763 return $scaped_attr;
761 764 }
762 765
763 - if ( is_string( $attr ) ) { //FixIn: 9.7.3.6.2
766 + if ( is_string( $attr ) ) {
764 767
765 - $scaped_attr = esc_attr( $attr );
768 + $scaped_attr = sanitize_text_field( $attr ); // FixIn: 10.11.2.1.
766 769
767 770 return $scaped_attr;
768 771 }
769 772