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:
ryan 2007-01-09 08:25:39 +00:00
parent 1516281e70
commit e4851992ce
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ richedit = ( typeof tinyMCE == 'object' && tinyMCE.configs.length > 0 );
function sendToEditor(n) { function sendToEditor(n) {
o = document.getElementById('div'+n); o = document.getElementById('div'+n);
h = o.innerHTML.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // Trim 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(' (width|height)=".*?"', 'g'), ''); // Drop size constraints
h = h.replace(new RegExp(' on(click|mousedown)="[^"]*"', 'g'), ''); // Drop menu events h = h.replace(new RegExp(' on(click|mousedown)="[^"]*"', 'g'), ''); // Drop menu events
h = h.replace(new RegExp('<(/?)A', 'g'), '<$1a'); // Lowercase tagnames h = h.replace(new RegExp('<(/?)A', 'g'), '<$1a'); // Lowercase tagnames