<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12619] trunk/wp-admin/ms-options.php: Add esc_attr to ms-options.php.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12619">12619</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-07 00:21:19 +0000 (Thu, 07 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add esc_attr to ms-options.php. see <a href="http://trac.wordpress.org/ticket/11782">#11782</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (12618 => 12619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-01-07 00:17:13 UTC (rev 12618)
+++ trunk/wp-admin/ms-options.php        2010-01-07 00:21:19 UTC (rev 12619)
</span><span class="lines">@@ -9,9 +9,8 @@
</span><span class="cx">
</span><span class="cx"> include('admin-header.php');
</span><span class="cx">
</span><del>-if( is_site_admin() == false ) {
</del><ins>+if ( !is_super_admin() )
</ins><span class="cx"> wp_die( __('You do not have permission to access this page.') );
</span><del>-}
</del><span class="cx">
</span><span class="cx"> if (isset($_GET['updated'])) {
</span><span class="cx">         ?>
</span><span class="lines">@@ -29,7 +28,7 @@
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Site Name') ?></th>
</span><span class="cx">                                 <td>
</span><del>-                                        <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" />
</del><ins>+                                        <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo esc_attr($current_site->site_name) ?>" size="45" />
</ins><span class="cx">                                         <br />
</span><span class="cx">                                         <?php _e('What you would like to call this website.') ?>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -38,7 +37,7 @@
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Site Admin Email') ?></th>
</span><span class="cx">                                 <td>
</span><del>-                                        <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" />
</del><ins>+                                        <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo esc_attr( stripslashes( get_site_option('admin_email') ) ) ?>" size="45" />
</ins><span class="cx">                                         <br />
</span><span class="cx">                                         <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -95,8 +94,8 @@
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 $blogname = '';
</span><span class="cx">                                         }?>
</span><del>-                                        <input name="dashboard_blog_orig" type="hidden" id="dashboard_blog_orig" value="<?php echo $blogname; ?>" />
-                                        <input name="dashboard_blog" type="text" id="dashboard_blog" value="<?php echo $blogname; ?>" size="30" />
</del><ins>+                                        <input name="dashboard_blog_orig" type="hidden" id="dashboard_blog_orig" value="<?php echo esc_attr($blogname); ?>" />
+                                        <input name="dashboard_blog" type="text" id="dashboard_blog" value="<?php echo esc_attr($blogname); ?>" size="30" />
</ins><span class="cx">                                         <br />
</span><span class="cx">                                         <?php _e( "Blogname ('dashboard', 'control', 'manager', etc) or blog id.<br />New users are added to this blog as subscribers (or the user role defined below) if they don't have a blog. Leave blank for the main blog. 'Subscriber' users on old blog will be moved to the new blog if changed. New blog will be created if it does not exist." ); ?>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -116,7 +115,7 @@
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Banned Names') ?></th>
</span><span class="cx">                                 <td>
</span><del>-                                        <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" />
</del><ins>+                                        <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo esc_attr( implode( " ", get_site_option('illegal_names') ) ); ?>" size="45" />
</ins><span class="cx">                                         <br />
</span><span class="cx">                                         <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -193,7 +192,7 @@
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('First Comment URL') ?></th>
</span><span class="cx">                                 <td>
</span><del>-                                        <input type="text" size='40' name="first_comment_url" id="first_comment_url" value="<?php echo get_site_option('first_comment_url') ?>" />
</del><ins>+                                        <input type="text" size='40' name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr(get_site_option('first_comment_url')) ?>" />
</ins><span class="cx">                                         <br />
</span><span class="cx">                                         <?php _e('URL on first comment on a new blog.') ?>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -216,21 +215,21 @@
</span><span class="cx">                         </tr>
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Blog upload space') ?></th>
</span><del>-                                <td><input name="blog_upload_space" type="text" id="blog_upload_space" value="<?php echo get_site_option('blog_upload_space', 10) ?>" size="3" /> MB</td>
</del><ins>+                                <td><input name="blog_upload_space" type="text" id="blog_upload_space" value="<?php echo esc_attr( get_site_option('blog_upload_space', 10) ) ?>" size="3" /> MB</td>
</ins><span class="cx">                         </tr>
</span><span class="cx">
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Upload File Types') ?></th>
</span><del>-                                <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo get_site_option('upload_filetypes', 'jpg jpeg png gif') ?>" size="45" /></td>
</del><ins>+                                <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo esc_attr( get_site_option('upload_filetypes', 'jpg jpeg png gif') ) ?>" size="45" /></td>
</ins><span class="cx">                         </tr>
</span><span class="cx">
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Max upload file size') ?></th>
</span><del>-                                <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_site_option('fileupload_maxk', 300) ?>" size="5" /> KB</td>
</del><ins>+                                <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo esc_attr( get_site_option('fileupload_maxk', 300) ) ?>" size="5" /> KB</td>
</ins><span class="cx">                         </tr>
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Admin Notice Feed') ?></th>
</span><del>-                                <td><input name="admin_notice_feed" style="width: 95%" type="text" id="admin_notice_feed" value="<?php echo get_site_option( 'admin_notice_feed' ) ?>" size="80" /><br />
</del><ins>+                                <td><input name="admin_notice_feed" style="width: 95%" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br />
</ins><span class="cx">                                 <?php _e( 'Display the latest post from this RSS or Atom feed on all blog dashboards. Leave blank to disable.' ); ?><br />
</span><span class="cx">                                 <?php if( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site->domain . $current_site->path . 'feed/' )
</span><span class="cx">                                         echo __( "A good one to use would be the feed from your main blog: " ) . 'http://' . $current_site->domain . $current_site->path . 'feed/'; ?></td>
</span><span class="lines">@@ -242,7 +241,7 @@
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e('Site Admins') ?></th>
</span><span class="cx">                                 <td>
</span><del>-                                        <input name="site_admins" type="text" id="site_admins" style="width: 95%" value="<?php echo implode(' ', get_site_option( 'site_admins', array( 'admin' ) ) ) ?>" size="45" />
</del><ins>+                                        <input name="site_admins" type="text" id="site_admins" style="width: 95%" value="<?php echo esc_attr( implode(' ', get_site_option( 'site_admins', array( 'admin' ) ) ) ) ?>" size="45" />
</ins><span class="cx">                                         <br />
</span><span class="cx">                                         <?php _e('These users may login to the main blog and administer the site. Space separated list of usernames.') ?>
</span><span class="cx">                                 </td>
</span><span class="lines">@@ -291,7 +290,7 @@
</span><span class="cx">                 <?php do_action( 'wpmu_options' ); // Add more options here ?>
</span><span class="cx">
</span><span class="cx">                 <p class="submit">
</span><del>-                        <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p>
</del><ins>+                        <input type="submit" name="Submit" value="<?php esc_attr_e('Update Options') ?>" /></p>
</ins><span class="cx">         </form>
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>