← All changes
|
public/partials/class-poll-maker-extra-shortcode.php
+6
-6
5.6.3
→
6.5.1
View file →
| @@ -83,9 +83,9 @@ | ||
| 83 | 83 | |
| 84 | 84 | $id = (isset($attr['id']) && $attr['id'] != '') ? absint( sanitize_text_field($attr['id']) ) : null; |
| 85 | 85 | |
| 86 | 86 | if (is_null($id) || $id == 0 ) { |
| 87 | - $passed_users_count_html = "<p class='wrong_shortcode_text' style='color:red;'>" . __('Wrong shortcode initialized', "poll-maker") . "</p>"; | |
| 87 | + $passed_users_count_html = "<p class='wrong_shortcode_text' style='color:red;'>" .esc_html__('Wrong shortcode initialized', "poll-maker") . "</p>"; | |
| 88 | 88 | return str_replace(array("\r\n", "\n", "\r"), "\n", $passed_users_count_html); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $unique_id = uniqid(); |
| @@ -105,9 +105,9 @@ | ||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $content_html = array(); |
| 108 | 108 | if( is_null( $results ) ){ |
| 109 | - $content_html = "<p style='text-align: center;font-style:italic;'>" . __( "There are no results yet.", "poll-maker" ) . "</p>"; | |
| 109 | + $content_html = "<p style='text-align: center;font-style:italic;'>" .esc_html__( "There are no results yet.", "poll-maker" ) . "</p>"; | |
| 110 | 110 | return $content_html; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | $passed_users_count = (isset( $results['res_count'] ) && $results['res_count'] != '') ? sanitize_text_field( $results['res_count'] ) : 0; |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | |
| 113 | 113 | $passed_users_count = (isset( $results['res_count'] ) && $results['res_count'] != '') ? sanitize_text_field( $results['res_count'] ) : 0; |
| 114 | 114 | |
| 115 | 115 | if ( $passed_users_count == 0 ) { |
| 116 | - $content_html = "<p style='text-align: center;font-style:italic;'>" . __( "There are no results yet.", "poll-maker" ) . "</p>"; | |
| 116 | + $content_html = "<p style='text-align: center;font-style:italic;'>" .esc_html__( "There are no results yet.", "poll-maker" ) . "</p>"; | |
| 117 | 117 | return $content_html; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $content_html[] = "<span class='". $this->html_name_prefix ."passed-users-count-box' id='". $this->html_name_prefix ."passed-users-count-box-". $this->unique_id_in_class ."' data-id='". $this->unique_id ."'>"; |
| @@ -212,9 +212,9 @@ | ||
| 212 | 212 | |
| 213 | 213 | $id = (isset($attr['id']) && $attr['id'] != '') ? absint( sanitize_text_field($attr['id']) ) : null; |
| 214 | 214 | |
| 215 | 215 | if (is_null($id) || $id == 0 ) { |
| 216 | - $poll_creation_date_html = "<p class='wrong_shortcode_text' style='color:red;'>" . __('Wrong shortcode initialized', "poll-maker") . "</p>"; | |
| 216 | + $poll_creation_date_html = "<p class='wrong_shortcode_text' style='color:red;'>" .esc_html__('Wrong shortcode initialized', "poll-maker") . "</p>"; | |
| 217 | 217 | return str_replace(array("\r\n", "\n", "\r"), "\n", $poll_creation_date_html); |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | $unique_id = uniqid(); |
| @@ -232,9 +232,9 @@ | ||
| 232 | 232 | |
| 233 | 233 | $content_html = array(); |
| 234 | 234 | |
| 235 | 235 | if($results === null){ |
| 236 | - $content_html = "<p style='text-align: center;font-style:italic;'>" . __( "There are no results yet.", "poll-maker" ) . "</p>"; | |
| 236 | + $content_html = "<p style='text-align: center;font-style:italic;'>" .esc_html__( "There are no results yet.", "poll-maker" ) . "</p>"; | |
| 237 | 237 | return $content_html; |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | $content_html[] = "<span class='". $this->html_name_prefix ."creation-date-box' id='". $this->html_name_prefix ."creation-date-box-". $this->unique_id_in_class ."' data-id='". $this->unique_id ."'>"; |
| @@ -725,9 +725,9 @@ | ||
| 725 | 725 | $author = array("name"=>"Unknown"); |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | 728 | if(isset($author['name']) && $author['name'] == "Unknown"){ |
| 729 | - $author['name'] = __( "Unknown", "poll-maker" ); | |
| 729 | + $author['name'] =esc_html__( "Unknown", "poll-maker" ); | |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | 732 | $poll_author = (isset($author['name']) && $author['name'] != '') ? sanitize_text_field( $author['name'] ) : ""; |
| 733 | 733 | |