Inline uploader fix from smalldust. fixes #2990
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1516281e70
commit
e4851992ce
|
@ -431,7 +431,7 @@ richedit = ( typeof tinyMCE == 'object' && tinyMCE.configs.length > 0 );
|
|||
function sendToEditor(n) {
|
||||
o = document.getElementById('div'+n);
|
||||
h = o.innerHTML.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // Trim
|
||||
h = h.replace(new RegExp(' (class|title|width|height|id|onclick|onmousedown)=([^\'"][^ ]*)( |/|>)', 'g'), ' $1="$2"$3'); // Enclose attribs in quotes
|
||||
h = h.replace(new RegExp(' (class|title|width|height|id|onclick|onmousedown)=([^\'"][^ ]*)(?=( |/|>))', 'g'), ' $1="$2"'); // Enclose attribs in quotes
|
||||
h = h.replace(new RegExp(' (width|height)=".*?"', 'g'), ''); // Drop size constraints
|
||||
h = h.replace(new RegExp(' on(click|mousedown)="[^"]*"', 'g'), ''); // Drop menu events
|
||||
h = h.replace(new RegExp('<(/?)A', 'g'), '<$1a'); // Lowercase tagnames
|
||||
|
|
Loading…
Reference in New Issue