Skip to content
Permalink
Browse files

Page's title should be encoded or filtering html entities/javascript …

…code #271
  • Loading branch information...
mehrshaddarzi committed Jun 1, 2019
1 parent 20f70e5 commit aec4359975344f75385ae1ec257575d8131d6ec2
Showing with 3 additions and 3 deletions.
  1. +3 −3 includes/class-wp-statistics-pages.php
@@ -295,7 +295,7 @@ public static function get_page_info( $page_id, $type = 'post' ) {
case "post":
case "page":
$arg = array(
'title' => get_the_title( $page_id ),
'title' => esc_html( get_the_title( $page_id ) ),
'link' => get_the_permalink( $page_id ),
'edit_link' => get_edit_post_link( $page_id ),
'meta' => array(
@@ -308,7 +308,7 @@ public static function get_page_info( $page_id, $type = 'post' ) {
case "tax":
$term = get_term( $page_id );
$arg = array(
'title' => $term->name,
'title' => esc_html( $term->name ),
'link' => ( is_wp_error( get_term_link( $page_id ) ) === true ? '' : get_term_link( $page_id ) ),
'edit_link' => get_edit_term_link( $page_id ),
'meta' => array(
@@ -327,7 +327,7 @@ public static function get_page_info( $page_id, $type = 'post' ) {
case "author":
$user_info = get_userdata( $page_id );
$arg = array(
'title' => ( $user_info->display_name != "" ? $user_info->display_name : $user_info->first_name . ' ' . $user_info->last_name ),
'title' => ( $user_info->display_name != "" ? esc_html( $user_info->display_name ) : esc_html( $user_info->first_name . ' ' . $user_info->last_name ) ),
'link' => get_author_posts_url( $page_id ),
'edit_link' => get_edit_user_link( $page_id ),
);

0 comments on commit aec4359

Please sign in to comment.
You can’t perform that action at this time.