Skip to content

Commit

Permalink
Media: when copying from "caption" (textarea) to "alt" (text input) a…
Browse files Browse the repository at this point in the history
…lso remove line breaks, props kovshenin, fixes #23176 for 3.5

git-svn-id: https://develop.svn.wordpress.org/branches/3.5@23299 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
azaozz committed Jan 14, 2013
1 parent 5c5bf22 commit adc8f49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wp-includes/js/media-editor.js
Expand Up @@ -18,6 +18,7 @@
if ( 'image' === props.type && ! props.alt ) {
props.alt = props.caption || props.title || '';
props.alt = props.alt.replace( /<\/?[^>]+>/g, '' );
props.alt = props.alt.replace( /[\r\n]+/g, ' ' );
}

return props;
Expand Down

0 comments on commit adc8f49

Please sign in to comment.