Media: when copying from "caption" (textarea) to "alt" (text input) also remove line breaks, props kovshenin, fixes #23176 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@23298 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f4beefbb88
commit
84827c87dc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user