Ticket #21221: 21221.2.diff
File 21221.2.diff, 1.3 KB (added by , 10 years ago) |
---|
-
wp-includes/media.php
306 306 list( $img_src, $width, $height ) = image_downsize($id, $size); 307 307 $hwstring = image_hwstring($width, $height); 308 308 309 $title = $title ? 'title="' . esc_attr( $title) . '" ' : '';309 $title = $title ? 'title="' . esc_attr( wptexturize( $title ) ) . '" ' : ''; 310 310 311 311 $class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id; 312 312 … … 322 322 */ 323 323 $class = apply_filters( 'get_image_tag_class', $class, $id, $align, $size ); 324 324 325 $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr( $alt) . '" ' . $title . $hwstring . 'class="' . $class . '" />';325 $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr( wptexturize( $alt ) ) . '" ' . $title . $hwstring . 'class="' . $class . '" />'; 326 326 327 327 /** 328 328 * Filter the HTML content for the image tag. … … 711 711 $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption 712 712 if ( empty($default_attr['alt']) ) 713 713 $default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title 714 $default_attr['alt'] = wptexturize( $default_attr['alt'] ); 714 715 715 716 $attr = wp_parse_args($attr, $default_attr); 716 717