Correctly escape theme version numbers when displaying them.

Props collinsinternet.



git-svn-id: https://develop.svn.wordpress.org/trunk@32170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-04-20 06:26:35 +00:00
parent 99927c319e
commit 98da14ab75
2 changed files with 4 additions and 1 deletions

View File

@ -378,7 +378,7 @@ $can_delete = current_user_can( 'delete_themes' );
<# if ( data.active ) { #>
<span class="current-label"><?php _e( 'Current Theme' ); ?></span>
<# } #>
<h3 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php printf( __( 'Version: %s' ), '{{{ data.version }}}' ); ?></span></h3>
<h3 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></span></h3>
<h4 class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.authorAndUri }}}' ); ?></h4>
<# if ( data.hasUpdate ) { #>

View File

@ -636,6 +636,9 @@ final class WP_Theme implements ArrayAccess {
case 'Tags' :
$value = array_filter( array_map( 'trim', explode( ',', strip_tags( $value ) ) ) );
break;
case 'Version' :
$value = strip_tags( $value );
break;
}
return $value;