Ticket #20246: 20246.2.patch
File 20246.2.patch, 1.6 KB (added by , 12 years ago) |
---|
-
wp-includes/class-oembed.php
236 236 case 'photo': 237 237 if ( empty( $data->url ) || empty( $data->width ) || empty( $data->height ) ) 238 238 break; 239 if ( ! is_string( $data->url ) || ! is_numeric( $data->width ) || ! is_numeric( $data->height ) )240 break;241 239 242 $title = ! empty( $data->title ) && is_string( $data->title ) ?$data->title : '';243 $return = '<a href="' . esc_url( $url ) . '"><img src="' . esc_url( $data->url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->width) . '" height="' . esc_attr($data->height) . '" /></a>';240 $title = ! empty( $data->title ) ? (string) $data->title : ''; 241 $return = '<a href="' . esc_url( $url ) . '"><img src="' . esc_url( (string) $data->url ) . '" alt="' . esc_attr( $title ) . '" width="' . esc_attr( (int) $data->width ) . '" height="' . esc_attr( (int) $data->height ) . '" /></a>'; 244 242 break; 245 243 246 244 case 'video': 247 245 case 'rich': 248 if ( ! empty( $data->html ) && is_string( $data->html ))249 $return = $data->html;246 if ( ! empty( $data->html ) ) 247 $return = (string) $data->html; 250 248 break; 251 249 252 250 case 'link': 253 if ( ! empty( $data->title ) && is_string( $data->title ))254 $return = '<a href="' . esc_url( $url ) . '">' . esc_html( $data->title ) . '</a>';251 if ( ! empty( $data->title ) ) 252 $return = '<a href="' . esc_url( $url ) . '">' . esc_html( (string) $data->title ) . '</a>'; 255 253 break; 256 254 257 255 default: