Make WordPress Core

Ticket #3113: write_validation.diff

File write_validation.diff, 4.5 KB (added by Viper007Bond, 20 years ago)
  • wp-admin/admin-functions.php

     
    958958        global $post_ID;
    959959        // Exit if no meta
    960960        if (!$meta) {
    961                 echo '<tbody id="the-list"></tbody>'; //TBODY needed for list-manipulation JS
     961                echo '<tbody id="the-list"><tr style="display: none;"><td>&nbsp;</td></tr></tbody>'; //TBODY needed for list-manipulation JS
    962962                return;
    963963        }
    964964        $count = 0;
     
    12541254                <div id="quicktags">
    12551255                        ';
    12561256                wp_print_scripts( 'quicktags' );
    1257                 echo '                  <script type="text/javascript">if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();</script>
     1257                echo '                  <script type="text/javascript">
     1258                                //<![CDATA[
     1259                                if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();
     1260                                //]]>
     1261                        </script>
    12581262                </div>
    12591263';
    12601264        echo '
  • wp-admin/edit-form-advanced.php

     
    183183        $uploading_iframe_src = wp_nonce_url("inline-uploading.php?action=view&amp;post=$uploading_iframe_ID", 'inlineuploading');
    184184        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src);
    185185        if ( false != $uploading_iframe_src )
    186                 echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
     186                echo '<iframe id="uploading" frameborder="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
    187187}
    188188?>
    189189
  • wp-admin/edit-page-form.php

     
    159159        $uploading_iframe_src = wp_nonce_url("inline-uploading.php?action=view&amp;post=$uploading_iframe_ID", 'inlineuploading');
    160160        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src);
    161161        if ( false != $uploading_iframe_src )
    162                 echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
     162                echo '<iframe id="uploading" frameborder="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
    163163}
    164164?>
    165165
     
    191191        if ( current_user_can('delete_page', $post->ID) ) ?>
    192192                <input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />
    193193<?php endif; ?>
     194</div>
     195
    194196</form>
    195197
    196198</div>
    197 
    198 </div>
  • wp-admin/page.php

     
    5757        ?>
    5858        <div id='preview' class='wrap'>
    5959        <h2 id="preview-post"><?php _e('Page Preview (updated when page is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2>
    60                 <iframe src="<?php echo apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID))); ?>" width="100%" height="600" ></iframe>
     60                <iframe src="<?php echo wp_specialchars(apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
    6161        </div>
    6262        <?php
    6363        break;
  • wp-admin/post.php

     
    6363        ?>
    6464        <div id='preview' class='wrap'>
    6565        <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2>
    66                 <iframe src="<?php echo apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID))); ?>" width="100%" height="600" ></iframe>
     66                <iframe src="<?php echo wp_specialchars(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
    6767        </div>
    6868        <?php
    6969        break;