Media: when copying from "caption" (textarea) to "alt" (text input) also remove line breaks, props kovshenin, fixes #23176 for 3.5

git-svn-id: http://core.svn.wordpress.org/branches/3.5@23299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2013-01-14 17:37:00 +00:00
parent 92b80b80f1
commit 6111c51168

View File

@@ -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;