Prevent errors in QTags.closeAllTags(), make it remove button states but not modify the content (as that often is wrong anyways), fixes #15911

git-svn-id: http://svn.automattic.com/wordpress/trunk@19290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-11-15 01:15:10 +00:00
parent dc3a8f44fd
commit 83330267af
3 changed files with 7 additions and 3 deletions

View File

@ -534,7 +534,11 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
while ( tbo.length > 0 ) {
button = ed.getButton(tbo[tbo.length - 1]);
element = document.getElementById(ed.name + '_' + button.id);
button.callback.call(button, element, c, ed);
if ( e )
button.callback.call(button, element, c, ed);
else
button.closeTag(element, ed);
}
}
};

File diff suppressed because one or more lines are too long

View File

@ -68,7 +68,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 );
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20111108', 1 );
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20111114', 1 );
$scripts->localize( 'quicktags', 'quicktagsL10n', array(
'wordLookup' => __('Enter a word to look up:'),
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),