Skip to content

Conversation

audrasjb
Copy link
Contributor

Fixes: https://core.trac.wordpress.org/ticket/57265

Please note that this is a first iteration around this change.
Tests and comments welcome :)

Copy link
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a suggestion inline.

Some unit tests would be lovely too.

@@ -1100,7 +1100,8 @@ public function column_title( $post ) {
$pad = str_repeat( '— ', $this->current_level );
echo '<strong>';

$title = _draft_or_post_title();
$title = $post->post_title;
$title = empty( $title ) ? __( '(no title)' ) : strip_tags( $title );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$title = empty( $title ) ? __( '(no title)' ) : strip_tags( $title );
$title = empty( $title ) ? __( '(no title)' ) : wp_strip_all_tags( $title );

This covers the contents of <script> and <style> tags too, whereas the PHP function does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants