Make WordPress Core

Ticket #3224: 3224.diff

File 3224.diff, 3.7 KB (added by mdawaffe, 18 years ago)
  • wp-admin/upload-js.php

     
    7272                                var params = $H(this.params);
    7373                                params.ID = '';
    7474                                params.action = '';
    75                                 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'>echo wp_specialchars(__('&laquo; Back'), 1);</a>";
     75                                h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1); ?></a>";
    7676                        } else {
    7777                                h += "<a href='#' onclick='return theFileList.cancelView();'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1) ?></a>";
    7878                        }
    7979                        h += "<div id='file-title'>"
    8080                        if ( !this.currentImage.isImage )
    81                                 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>" + this.currentImage.title + "</a></h2>";
     81                                h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'" + this.currentImage.title + "</a></h2>";
    8282                        else
    8383                                h += "<h2>" + this.currentImage.title + "</h2>";
    8484                        h += " &#8212; <span>";
     
    8787                        h += '</div>'
    8888                        h += "<div id='upload-file-view' class='alignleft'>";
    8989                        if ( this.currentImage.isImage ) {
    90                                 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>>";
     90                                h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file'), 1); ?>'>";
    9191                                h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
    9292                                h += "</a>";
    9393                        } else
     
    134134                                var params = $H(this.params);
    135135                                params.ID = '';
    136136                                params.action = '';
    137                                 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'>&laquo;  <?php echo wp_specialchars(__('Back'), 1); ?></a>";
     137                                h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1); ?></a>";
    138138                        } else {
    139                                 h += "<a href='#' onclick='return theFileList.cancelView();'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'>&laquo; <?php echo wp_specialchars(__('Back'), 1); ?></a>";
     139                                h += "<a href='#' onclick='return theFileList.cancelView();'  title='<?php echo wp_specialchars(__('Browse your files'), 1); ?>' class='back'><?php echo wp_specialchars(__('&laquo; Back'), 1); ?></a>";
    140140                        }
    141141                        h += "<div id='file-title'>"
    142142                        if ( !this.currentImage.isImage )
     
    244244                },
    245245
    246246                deleteFile: function(id) {
    247                         if ( confirm("<?php printf(wp_specialchars(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back."), 1), '" + this.currentImage.title + "'); ?>") ) {
     247                        if ( confirm("<?php printf(js_escape(__("Are you sure you want to delete the file '%s'?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") ) {
    248248                                $('action-value').value = 'delete';
    249249                                $('upload-file').submit();
    250250                                return true;