Make WordPress Core


Ignore:
Timestamp:
11/25/2008 02:06:52 AM (17 years ago)
Author:
azaozz
Message:

More PressThis updates from Noel, see #7949

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/press-this.php

    r9866 r9867  
    128128        <h2><label for="embed-code"><?php _e('Embed Code') ?></label></h2>
    129129        <div class="inside">
    130 
    131130            <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo format_to_edit($selection, true); ?></textarea>
    132 
    133         <p id="options"><a href="#" class="select button"><?php _e('Insert Video'); ?></a> <a href="#" class="close button"><?php _e('Cancel'); ?></a></p>
     131            <p id="options"><a href="#" class="select button"><?php _e('Insert Video'); ?></a> <a href="#" class="close button"><?php _e('Cancel'); ?></a></p>
    134132        </div>
    135133        </div>
     
    141139                tb_remove();
    142140            });
    143 
    144141            jQuery('.select').click(function() {
    145142                image_selector();
     
    298295                jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>');
    299296                jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>');
    300                 insert_editor( "\n\n" + '<p style="text-align: center;"><a href="<?php echo $url; ?>"><img src="' + img +'" alt="' + desc + '" /></a></p>');
     297                insert_editor( "\n\n" + encodeURI('<p style="text-align: center;"><a href="<?php echo $url; ?>"><img src="' + img +'" alt="' + desc + '" /></a></p>'));
    301298            }
    302299            return false;
     
    386383    function insert_editor(text) {
    387384        if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) {
    388             tinyMCE.execCommand('mceInsertContent', false, '<p>' + tinymce.DOM.decode(text) + '</p>', {format : 'raw'});
     385            tinyMCE.execCommand('mceInsertContent', false, '<p>' + decodeURI(tinymce.DOM.decode(text)) + '</p>', {format : 'raw'});
    389386        } else {
    390387            insert_plain_editor(text);
     
    458455        <?php } ?>
    459456       
    460         jQuery('#publish, #save').click(function() { alert('test'); jQuery('#saving').css('display', 'inline'); });
     457        jQuery('#publish, #save').click(function() { jQuery('#saving').css('display', 'inline'); });
    461458    });
    462459</script>
Note: See TracChangeset for help on using the changeset viewer.