X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/cc7b1505cd9fafd87c3672f669e13e98b0c544f7..022dfbbbe3215917d84708eb09acca93b21ae9e0:/wp-admin/inline-uploading.php diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index d0bd8250..212f1159 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -24,6 +24,8 @@ for ($i=0; $i'; ab[{$ID}] = ''; imga[{$ID}] = '\"{$title}\"'; @@ -258,7 +260,7 @@ imgb[{$ID}] = '\"{$title}\" "; } else { - $title = wp_specialchars($attachment['post_title'], ENT_QUOTES); + $title = attribute_escape($attachment['post_title']); $filename = basename($attachment['guid']); $icon = get_attachment_icon($ID); $toggle_icon = "$__using_title"; @@ -429,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