<!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>[16431] trunk: esc_textarea() and application for obvious textarea escaping
 .</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16431">16431</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2010-11-17 17:12:01 +0000 (Wed, 17 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>esc_textarea() and application for obvious textarea escaping. props alexkingorg. fixes <a href="http://trac.wordpress.org/ticket/15454">#15454</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminedittagformphp">trunk/wp-admin/edit-tag-form.php</a></li>
<li><a href="#trunkwpadminincludesclasswpcommentslisttablephp">trunk/wp-admin/includes/class-wp-comments-list-table.php</a></li>
<li><a href="#trunkwpadminincludesdashboardphp">trunk/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminincludesmetaboxesphp">trunk/wp-admin/includes/meta-boxes.php</a></li>
<li><a href="#trunkwpadminincludesnavmenuphp">trunk/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminmaintrepairphp">trunk/wp-admin/maint/repair.php</a></li>
<li><a href="#trunkwpadminnetworksettingsphp">trunk/wp-admin/network/settings.php</a></li>
<li><a href="#trunkwpadminnetworksiteoptionsphp">trunk/wp-admin/network/site-options.php</a></li>
<li><a href="#trunkwpadminnetworkphp">trunk/wp-admin/network.php</a></li>
<li><a href="#trunkwpadminoptionsdiscussionphp">trunk/wp-admin/options-discussion.php</a></li>
<li><a href="#trunkwpadminoptionspermalinkphp">trunk/wp-admin/options-permalink.php</a></li>
<li><a href="#trunkwpadminoptionswritingphp">trunk/wp-admin/options-writing.php</a></li>
<li><a href="#trunkwpadminoptionsphp">trunk/wp-admin/options.php</a></li>
<li><a href="#trunkwpadminplugineditorphp">trunk/wp-admin/plugin-editor.php</a></li>
<li><a href="#trunkwpadminpressthisphp">trunk/wp-admin/press-this.php</a></li>
<li><a href="#trunkwpadminthemeeditorphp">trunk/wp-admin/theme-editor.php</a></li>
<li><a href="#trunkwpadminusereditphp">trunk/wp-admin/user-edit.php</a></li>
<li><a href="#trunkwpincludesdefaultwidgetsphp">trunk/wp-includes/default-widgets.php</a></li>
<li><a href="#trunkwpincludesformattingphp">trunk/wp-includes/formatting.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminedittagformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tag-form.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tag-form.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/edit-tag-form.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> &lt;?php endif; // is_taxonomy_hierarchical() ?&gt;
</span><span class="cx">                 &lt;tr class=&quot;form-field&quot;&gt;
</span><span class="cx">                         &lt;th scope=&quot;row&quot; valign=&quot;top&quot;&gt;&lt;label for=&quot;description&quot;&gt;&lt;?php _ex('Description', 'Taxonomy Description'); ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-                        &lt;td&gt;&lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;5&quot; cols=&quot;50&quot; style=&quot;width: 97%;&quot;&gt;&lt;?php echo esc_html($tag-&gt;description); ?&gt;&lt;/textarea&gt;&lt;br /&gt;
</del><ins>+                        &lt;td&gt;&lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;5&quot; cols=&quot;50&quot; style=&quot;width: 97%;&quot;&gt;&lt;?php echo esc_textarea( $tag-&gt;description ); ?&gt;&lt;/textarea&gt;&lt;br /&gt;
</ins><span class="cx">                         &lt;span class=&quot;description&quot;&gt;&lt;?php _e('The description is not prominent by default, however some themes may show it.'); ?&gt;&lt;/span&gt;&lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">                 &lt;?php
</span></span></pre></div>
<a id="trunkwpadminincludesclasswpcommentslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-comments-list-table.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-comments-list-table.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/includes/class-wp-comments-list-table.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx">                 comment_text();
</span><span class="cx">                 if ( $user_can ) { ?&gt;
</span><span class="cx">                 &lt;div id=&quot;inline-&lt;?php echo $comment-&gt;comment_ID; ?&gt;&quot; class=&quot;hidden&quot;&gt;
</span><del>-                &lt;textarea class=&quot;comment&quot; rows=&quot;1&quot; cols=&quot;1&quot;&gt;&lt;?php echo esc_html( apply_filters( 'comment_edit_pre', $comment-&gt;comment_content ) ); ?&gt;&lt;/textarea&gt;
</del><ins>+                &lt;textarea class=&quot;comment&quot; rows=&quot;1&quot; cols=&quot;1&quot;&gt;&lt;?php echo esc_textarea( apply_filters( 'comment_edit_pre', $comment-&gt;comment_content ) ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                 &lt;div class=&quot;author-email&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author_email ); ?&gt;&lt;/div&gt;
</span><span class="cx">                 &lt;div class=&quot;author&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author ); ?&gt;&lt;/div&gt;
</span><span class="cx">                 &lt;div class=&quot;author-url&quot;&gt;&lt;?php echo esc_attr( $comment-&gt;comment_author_url ); ?&gt;&lt;/div&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesdashboardphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/dashboard.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/dashboard.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/includes/dashboard.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -518,7 +518,7 @@
</span><span class="cx"> 
</span><span class="cx">                 &lt;h4 id=&quot;content-label&quot;&gt;&lt;label for=&quot;content&quot;&gt;&lt;?php _e('Content') ?&gt;&lt;/label&gt;&lt;/h4&gt;
</span><span class="cx">                 &lt;div class=&quot;textarea-wrap&quot;&gt;
</span><del>-                        &lt;textarea name=&quot;content&quot; id=&quot;content&quot; class=&quot;mceEditor&quot; rows=&quot;3&quot; cols=&quot;15&quot; tabindex=&quot;2&quot;&gt;&lt;?php echo $post-&gt;post_content; ?&gt;&lt;/textarea&gt;
</del><ins>+                        &lt;textarea name=&quot;content&quot; id=&quot;content&quot; class=&quot;mceEditor&quot; rows=&quot;3&quot; cols=&quot;15&quot; tabindex=&quot;2&quot;&gt;&lt;?php echo esc_textarea( $post-&gt;post_content ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                 &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;script type=&quot;text/javascript&quot;&gt;edCanvas = document.getElementById('content');edInsertContent = null;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/includes/media.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -1282,7 +1282,7 @@
</span><span class="cx">                 if ( !empty( $field[ $field['input'] ] ) )
</span><span class="cx">                         $item .= $field[ $field['input'] ];
</span><span class="cx">                 elseif ( $field['input'] == 'textarea' ) {
</span><del>-                        $item .= &quot;&lt;textarea type='text' id='$name' name='$name' $aria_required&gt;&quot; . esc_html( $field['value'] ) . '&lt;/textarea&gt;';
</del><ins>+                        $item .= &quot;&lt;textarea type='text' id='$name' name='$name' $aria_required&gt;&quot; . esc_textarea( $field['value'] ) . '&lt;/textarea&gt;';
</ins><span class="cx">                 } else {
</span><span class="cx">                         $item .= &quot;&lt;input type='text' class='text' id='$name' name='$name' value='&quot; . esc_attr( $field['value'] ) . &quot;' $aria_required /&gt;&quot;;
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/includes/meta-boxes.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -285,7 +285,7 @@
</span><span class="cx">         &lt;div class=&quot;jaxtag&quot;&gt;
</span><span class="cx">         &lt;div class=&quot;nojs-tags hide-if-js&quot;&gt;
</span><span class="cx">         &lt;p&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;add_or_remove_items; ?&gt;&lt;/p&gt;
</span><del>-        &lt;textarea name=&quot;&lt;?php echo &quot;tax_input[$tax_name]&quot;; ?&gt;&quot; rows=&quot;3&quot; cols=&quot;20&quot; class=&quot;the-tags&quot; id=&quot;tax-input-&lt;?php echo $tax_name; ?&gt;&quot; &lt;?php echo $disabled; ?&gt;&gt;&lt;?php echo esc_attr(get_terms_to_edit( $post-&gt;ID, $tax_name )); ?&gt;&lt;/textarea&gt;&lt;/div&gt;
</del><ins>+        &lt;textarea name=&quot;&lt;?php echo &quot;tax_input[$tax_name]&quot;; ?&gt;&quot; rows=&quot;3&quot; cols=&quot;20&quot; class=&quot;the-tags&quot; id=&quot;tax-input-&lt;?php echo $tax_name; ?&gt;&quot; &lt;?php echo $disabled; ?&gt;&gt;&lt;?php echo esc_textarea( get_terms_to_edit( $post-&gt;ID, $tax_name ) ); ?&gt;&lt;/textarea&gt;&lt;/div&gt;
</ins><span class="cx">          &lt;?php if ( current_user_can($taxonomy-&gt;cap-&gt;assign_terms) ) : ?&gt;
</span><span class="cx">         &lt;div class=&quot;ajaxtag hide-if-no-js&quot;&gt;
</span><span class="cx">                 &lt;label class=&quot;screen-reader-text&quot; for=&quot;new-tag-&lt;?php echo $tax_name; ?&gt;&quot;&gt;&lt;?php echo $box['title']; ?&gt;&lt;/label&gt;
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx">  */
</span><span class="cx"> function post_excerpt_meta_box($post) {
</span><span class="cx"> ?&gt;
</span><del>-&lt;label class=&quot;screen-reader-text&quot; for=&quot;excerpt&quot;&gt;&lt;?php _e('Excerpt') ?&gt;&lt;/label&gt;&lt;textarea rows=&quot;1&quot; cols=&quot;40&quot; name=&quot;excerpt&quot; tabindex=&quot;6&quot; id=&quot;excerpt&quot;&gt;&lt;?php echo $post-&gt;post_excerpt ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;label class=&quot;screen-reader-text&quot; for=&quot;excerpt&quot;&gt;&lt;?php _e('Excerpt') ?&gt;&lt;/label&gt;&lt;textarea rows=&quot;1&quot; cols=&quot;40&quot; name=&quot;excerpt&quot; tabindex=&quot;6&quot; id=&quot;excerpt&quot;&gt;&lt;?php echo esc_textarea( $post-&gt;post_excerpt ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx"> &lt;p&gt;&lt;?php _e('Excerpts are optional hand-crafted summaries of your content that can be used in your theme. &lt;a href=&quot;http://codex.wordpress.org/Excerpt&quot; target=&quot;_blank&quot;&gt;Learn more about manual excerpts.&lt;/a&gt;'); ?&gt;&lt;/p&gt;
</span><span class="cx"> &lt;?php
</span><span class="cx"> }
</span><span class="lines">@@ -894,7 +894,7 @@
</span><span class="cx">         &lt;/tr&gt;
</span><span class="cx">         &lt;tr class=&quot;form-field&quot;&gt;
</span><span class="cx">                 &lt;th valign=&quot;top&quot;  scope=&quot;row&quot;&gt;&lt;label for=&quot;link_notes&quot;&gt;&lt;?php _e('Notes') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-                &lt;td&gt;&lt;textarea name=&quot;link_notes&quot; id=&quot;link_notes&quot; cols=&quot;50&quot; rows=&quot;10&quot; style=&quot;width: 95%&quot;&gt;&lt;?php echo  ( isset( $link-&gt;link_notes ) ? $link-&gt;link_notes : ''); ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</del><ins>+                &lt;td&gt;&lt;textarea name=&quot;link_notes&quot; id=&quot;link_notes&quot; cols=&quot;50&quot; rows=&quot;10&quot; style=&quot;width: 95%&quot;&gt;&lt;?php echo esc_textarea( ( isset( $link-&gt;link_notes ) ? $link-&gt;link_notes : '') ); ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</ins><span class="cx">         &lt;/tr&gt;
</span><span class="cx">         &lt;tr class=&quot;form-field&quot;&gt;
</span><span class="cx">                 &lt;th valign=&quot;top&quot;  scope=&quot;row&quot;&gt;&lt;label for=&quot;link_rating&quot;&gt;&lt;?php _e('Rating') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span></span></pre></div>
<a id="trunkwpadminincludesnavmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/nav-menu.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/nav-menu.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/includes/nav-menu.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">                                 &lt;p class=&quot;field-description description description-wide&quot;&gt;
</span><span class="cx">                                         &lt;label for=&quot;edit-menu-item-description-&lt;?php echo $item_id; ?&gt;&quot;&gt;
</span><span class="cx">                                                 &lt;?php _e( 'Description' ); ?&gt;&lt;br /&gt;
</span><del>-                                                &lt;textarea id=&quot;edit-menu-item-description-&lt;?php echo $item_id; ?&gt;&quot; class=&quot;widefat edit-menu-item-description&quot; rows=&quot;3&quot; cols=&quot;20&quot; name=&quot;menu-item-description[&lt;?php echo $item_id; ?&gt;]&quot;&gt;&lt;?php echo esc_html( $item-&gt;description ); ?&gt;&lt;/textarea&gt;
</del><ins>+                                                &lt;textarea id=&quot;edit-menu-item-description-&lt;?php echo $item_id; ?&gt;&quot; class=&quot;widefat edit-menu-item-description&quot; rows=&quot;3&quot; cols=&quot;20&quot; name=&quot;menu-item-description[&lt;?php echo $item_id; ?&gt;]&quot;&gt;&lt;?php echo esc_textarea( $item-&gt;description ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                                 &lt;span class=&quot;description&quot;&gt;&lt;?php _e('The description will be displayed in the menu if the current theme supports it.'); ?&gt;&lt;/span&gt;
</span><span class="cx">                                         &lt;/label&gt;
</span><span class="cx">                                 &lt;/p&gt;
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/includes/template.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -483,7 +483,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $entry['meta_key'] = esc_attr($entry['meta_key']);
</span><del>-        $entry['meta_value'] = htmlspecialchars($entry['meta_value']); // using a &lt;textarea /&gt;
</del><ins>+        $entry['meta_value'] = esc_textarea( $entry['meta_value'] ); // using a &lt;textarea /&gt;
</ins><span class="cx">         $entry['meta_id'] = (int) $entry['meta_id'];
</span><span class="cx"> 
</span><span class="cx">         $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] );
</span><span class="lines">@@ -718,7 +718,7 @@
</span><span class="cx">         &lt;col class=&quot;widefat&quot; /&gt;
</span><span class="cx">         &lt;tr&gt;
</span><span class="cx">                 &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'URL' ) ?&gt;&lt;/th&gt;
</span><del>-                &lt;td&gt;&lt;textarea rows=&quot;1&quot; cols=&quot;40&quot; type=&quot;text&quot; class=&quot;attachmentlinks&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo wp_get_attachment_url(); ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</del><ins>+                &lt;td&gt;&lt;textarea rows=&quot;1&quot; cols=&quot;40&quot; type=&quot;text&quot; class=&quot;attachmentlinks&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_textarea( wp_get_attachment_url() ); ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</ins><span class="cx">         &lt;/tr&gt;
</span><span class="cx"> &lt;?php if ( $icon ) : ?&gt;
</span><span class="cx">         &lt;tr&gt;
</span></span></pre></div>
<a id="trunkwpadminmaintrepairphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/maint/repair.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/maint/repair.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/maint/repair.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">                 $problem_output = array();
</span><span class="cx">                 foreach ( $problems as $table =&gt; $problem )
</span><span class="cx">                         $problem_output[] = &quot;$table: $problem&quot;;
</span><del>-                echo '&lt;textarea name=&quot;errors&quot; id=&quot;errors&quot; rows=&quot;20&quot; cols=&quot;60&quot;&gt;' . format_to_edit(implode(&quot;\n&quot;, $problem_output)) . '&lt;/textarea&gt;';
</del><ins>+                echo '&lt;textarea name=&quot;errors&quot; id=&quot;errors&quot; rows=&quot;20&quot; cols=&quot;60&quot;&gt;' . esc_textarea( implode(&quot;\n&quot;, $problem_output) ) . '&lt;/textarea&gt;';
</ins><span class="cx">         } else {
</span><span class="cx">                 echo '&lt;p&gt;'.__('Repairs complete.  Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.').&quot;&lt;/p&gt;&lt;code&gt;define('WP_ALLOW_REPAIR', true);&lt;/code&gt;&quot;;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpadminnetworksettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/settings.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/settings.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/network/settings.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">                                         &lt;?php $limited_email_domains = get_site_option( 'limited_email_domains' );
</span><span class="cx">                                         $limited_email_domains = str_replace( ' ', &quot;\n&quot;, $limited_email_domains ); ?&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;limited_email_domains&quot; id=&quot;limited_email_domains&quot; cols=&quot;45&quot; rows=&quot;5&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( $limited_email_domains == '' ? '' : implode( &quot;\n&quot;, (array) $limited_email_domains ) ); ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( $limited_email_domains == '' ? '' : implode( &quot;\n&quot;, (array) $limited_email_domains ) ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;banned_email_domains&quot;&gt;&lt;?php _e('Banned Email Domains') ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;banned_email_domains&quot; id=&quot;banned_email_domains&quot; cols=&quot;45&quot; rows=&quot;5&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( &quot;\n&quot;, (array) get_site_option( 'banned_email_domains' ) ) ); ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( &quot;\n&quot;, (array) get_site_option( 'banned_email_domains' ) ) ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;welcome_email&quot;&gt;&lt;?php _e( 'Welcome Email' ) ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;welcome_email&quot; id=&quot;welcome_email&quot; rows=&quot;5&quot; cols=&quot;45&quot; class=&quot;large-text&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_email' ) ) ) ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( stripslashes( get_site_option( 'welcome_email' ) ) ) ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'The welcome email sent to new site owners.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;welcome_user_email&quot;&gt;&lt;?php _e( 'Welcome User Email' ) ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;welcome_user_email&quot; id=&quot;welcome_user_email&quot; rows=&quot;5&quot; cols=&quot;45&quot; class=&quot;large-text&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( stripslashes( get_site_option( 'welcome_user_email' ) ) ) ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( stripslashes( get_site_option( 'welcome_user_email' ) ) ) ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'The welcome email sent to new users.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;first_post&quot;&gt;&lt;?php _e( 'First Post' ) ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;first_post&quot; id=&quot;first_post&quot; rows=&quot;5&quot; cols=&quot;45&quot; class=&quot;large-text&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( stripslashes( get_site_option( 'first_post' ) ) ) ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( stripslashes( get_site_option( 'first_post' ) ) ) ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'The first post on a new site.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;first_page&quot;&gt;&lt;?php _e( 'First Page' ) ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;first_page&quot; id=&quot;first_page&quot; rows=&quot;5&quot; cols=&quot;45&quot; class=&quot;large-text&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( stripslashes( get_site_option('first_page') ) ) ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( stripslashes( get_site_option('first_page') ) ) ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'The first page on a new site.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;first_comment&quot;&gt;&lt;?php _e( 'First Comment' ) ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;td&gt;
</span><span class="cx">                                         &lt;textarea name=&quot;first_comment&quot; id=&quot;first_comment&quot; rows=&quot;5&quot; cols=&quot;45&quot; class=&quot;large-text&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( stripslashes( get_site_option('first_comment') ) ) ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;?php echo esc_textarea( stripslashes( get_site_option('first_comment') ) ) ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;br /&gt;
</span><span class="cx">                                         &lt;?php _e( 'The first comment on a new site.' ) ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span></span></pre></div>
<a id="trunkwpadminnetworksiteoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/site-options.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/site-options.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/network/site-options.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">                         ?&gt;
</span><span class="cx">                                 &lt;tr class=&quot;form-field&quot;&gt;
</span><span class="cx">                                         &lt;th scope=&quot;row&quot;&gt;&lt;?php echo ucwords( str_replace( &quot;_&quot;, &quot; &quot;, $option-&gt;option_name ) ) ?&gt;&lt;/th&gt;
</span><del>-                                        &lt;td&gt;&lt;textarea class=&quot;&lt;?php echo $class; ?&gt;&quot; rows=&quot;5&quot; cols=&quot;40&quot; name=&quot;option[&lt;?php echo esc_attr( $option-&gt;option_name ) ?&gt;]&quot; id=&quot;&lt;?php echo esc_attr( $option-&gt;option_name ) ?&gt;&quot;&lt;?php disabled( $disabled ) ?&gt;&gt;&lt;?php echo wp_htmledit_pre( $option-&gt;option_value ) ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</del><ins>+                                        &lt;td&gt;&lt;textarea class=&quot;&lt;?php echo $class; ?&gt;&quot; rows=&quot;5&quot; cols=&quot;40&quot; name=&quot;option[&lt;?php echo esc_attr( $option-&gt;option_name ) ?&gt;]&quot; id=&quot;&lt;?php echo esc_attr( $option-&gt;option_name ) ?&gt;&quot;&lt;?php disabled( $disabled ) ?&gt;&gt;&lt;?php echo esc_textarea( $option-&gt;option_value ) ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</ins><span class="cx">                                 &lt;/tr&gt;
</span><span class="cx">                         &lt;?php
</span><span class="cx">                         } else {
</span></span></pre></div>
<a id="trunkwpadminnetworkphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/network.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx">                 echo _n( 'This unique authentication key is also missing from your &lt;code&gt;wp-config.php&lt;/code&gt; file.', 'These unique authentication keys are also missing from your &lt;code&gt;wp-config.php&lt;/code&gt; file.', $num_keys_salts ); ?&gt; &lt;?php _e( 'To make your installation more secure, you should also add:' ) ?&gt;&lt;/p&gt;
</span><span class="cx">         &lt;textarea class=&quot;code&quot; readonly=&quot;readonly&quot; cols=&quot;100&quot; rows=&quot;&lt;?php echo $num_keys_salts; ?&gt;&quot;&gt;&lt;?php
</span><span class="cx">         foreach ( $keys_salts as $c =&gt; $v ) {
</span><del>-                echo &quot;\ndefine( '$c', '&quot; . wp_htmledit_pre( $v ) . &quot;' );&quot;;
</del><ins>+                echo &quot;\ndefine( '$c', '&quot; . esc_textarea( $v ) . &quot;' );&quot;;
</ins><span class="cx">         }
</span><span class="cx"> ?&gt;&lt;/textarea&gt;
</span><span class="cx"> &lt;?php
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx">         ?&gt;
</span><span class="cx">                 &lt;li&gt;&lt;p&gt;&lt;?php printf( __( 'Add the following to your &lt;code&gt;web.config&lt;/code&gt; file in &lt;code&gt;%s&lt;/code&gt;, replacing other WordPress rules:' ), ABSPATH ); ?&gt;&lt;/p&gt;
</span><span class="cx">                 &lt;textarea class=&quot;code&quot; readonly=&quot;readonly&quot; cols=&quot;100&quot; rows=&quot;20&quot;&gt;
</span><del>-                &lt;?php echo wp_htmledit_pre( $web_config_file ); ?&gt;
</del><ins>+                &lt;?php echo esc_textarea( $web_config_file ); ?&gt;
</ins><span class="cx">                 &lt;/textarea&gt;&lt;/li&gt;
</span><span class="cx">                 &lt;/ol&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -485,7 +485,7 @@
</span><span class="cx">                 ?&gt;
</span><span class="cx">                 &lt;li&gt;&lt;p&gt;&lt;?php printf( __( 'Add the following to your &lt;code&gt;.htaccess&lt;/code&gt; file in &lt;code&gt;%s&lt;/code&gt;, replacing other WordPress rules:' ), ABSPATH ); ?&gt;&lt;/p&gt;
</span><span class="cx">                 &lt;textarea class=&quot;code&quot; readonly=&quot;readonly&quot; cols=&quot;100&quot; rows=&quot;&lt;?php echo $subdomain_install ? 11 : 16; ?&gt;&quot;&gt;
</span><del>-&lt;?php echo wp_htmledit_pre( $htaccess_file ); ?&gt;&lt;/textarea&gt;&lt;/li&gt;
</del><ins>+&lt;?php echo esc_textarea( $htaccess_file ); ?&gt;&lt;/textarea&gt;&lt;/li&gt;
</ins><span class="cx">                 &lt;/ol&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;?php endif; // end IIS/Apache code branches.
</span></span></pre></div>
<a id="trunkwpadminoptionsdiscussionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-discussion.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-discussion.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/options-discussion.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;p&gt;&lt;label for=&quot;moderation_keys&quot;&gt;&lt;?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the &lt;a href=&quot;edit-comments.php?comment_status=moderated&quot;&gt;moderation queue&lt;/a&gt;. One word or IP per line. It will match inside words, so &amp;#8220;press&amp;#8221; will match &amp;#8220;WordPress&amp;#8221;.') ?&gt;&lt;/label&gt;&lt;/p&gt;
</span><span class="cx"> &lt;p&gt;
</span><del>-&lt;textarea name=&quot;moderation_keys&quot; rows=&quot;10&quot; cols=&quot;50&quot; id=&quot;moderation_keys&quot; class=&quot;large-text code&quot;&gt;&lt;?php form_option('moderation_keys'); ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;textarea name=&quot;moderation_keys&quot; rows=&quot;10&quot; cols=&quot;50&quot; id=&quot;moderation_keys&quot; class=&quot;large-text code&quot;&gt;&lt;?php esc_textarea( get_option( 'moderation_keys' ) ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx"> &lt;/p&gt;
</span><span class="cx"> &lt;/fieldset&gt;&lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> &lt;td&gt;&lt;fieldset&gt;&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;&lt;?php _e('Comment Blacklist') ?&gt;&lt;/span&gt;&lt;/legend&gt;
</span><span class="cx"> &lt;p&gt;&lt;label for=&quot;blacklist_keys&quot;&gt;&lt;?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so &amp;#8220;press&amp;#8221; will match &amp;#8220;WordPress&amp;#8221;.') ?&gt;&lt;/label&gt;&lt;/p&gt;
</span><span class="cx"> &lt;p&gt;
</span><del>-&lt;textarea name=&quot;blacklist_keys&quot; rows=&quot;10&quot; cols=&quot;50&quot; id=&quot;blacklist_keys&quot; class=&quot;large-text code&quot;&gt;&lt;?php form_option('blacklist_keys'); ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;textarea name=&quot;blacklist_keys&quot; rows=&quot;10&quot; cols=&quot;50&quot; id=&quot;blacklist_keys&quot; class=&quot;large-text code&quot;&gt;&lt;?php esc_textarea( get_option( 'blacklist_keys' ) ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx"> &lt;/p&gt;
</span><span class="cx"> &lt;/fieldset&gt;&lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;
</span></span></pre></div>
<a id="trunkwpadminoptionspermalinkphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-permalink.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-permalink.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/options-permalink.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -230,14 +230,14 @@
</span><span class="cx"> &lt;p&gt;&lt;?php _e('If your &lt;code&gt;web.config&lt;/code&gt; file were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so this is the url rewrite rule you should have in your &lt;code&gt;web.config&lt;/code&gt; file. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all. Then insert this rule inside of the &lt;code&gt;/&amp;lt;configuration&amp;gt;/&amp;lt;system.webServer&amp;gt;/&amp;lt;rewrite&amp;gt;/&amp;lt;rules&amp;gt;&lt;/code&gt; element in &lt;code&gt;web.config&lt;/code&gt; file.') ?&gt;&lt;/p&gt;
</span><span class="cx"> &lt;form action=&quot;options-permalink.php&quot; method=&quot;post&quot;&gt;
</span><span class="cx"> &lt;?php wp_nonce_field('update-permalink') ?&gt;
</span><del>-        &lt;p&gt;&lt;textarea rows=&quot;9&quot; class=&quot;large-text readonly&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html($wp_rewrite-&gt;iis7_url_rewrite_rules()); ?&gt;&lt;/textarea&gt;&lt;/p&gt;
</del><ins>+        &lt;p&gt;&lt;textarea rows=&quot;9&quot; class=&quot;large-text readonly&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_textarea( $wp_rewrite-&gt;iis7_url_rewrite_rules() ); ?&gt;&lt;/textarea&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;/form&gt;
</span><span class="cx"> &lt;p&gt;&lt;?php _e('If you temporarily make your &lt;code&gt;web.config&lt;/code&gt; file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.')  ?&gt;&lt;/p&gt;
</span><span class="cx">                 &lt;?php else : ?&gt;
</span><span class="cx"> &lt;p&gt;&lt;?php _e('If the root directory of your site were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so this is the url rewrite rule you should have in your &lt;code&gt;web.config&lt;/code&gt; file. Create a new file, called &lt;code&gt;web.config&lt;/code&gt; in the root directory of your site. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all. Then insert this code into the &lt;code&gt;web.config&lt;/code&gt; file.') ?&gt;&lt;/p&gt;
</span><span class="cx"> &lt;form action=&quot;options-permalink.php&quot; method=&quot;post&quot;&gt;
</span><span class="cx"> &lt;?php wp_nonce_field('update-permalink') ?&gt;
</span><del>-        &lt;p&gt;&lt;textarea rows=&quot;18&quot; class=&quot;large-text readonly&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html($wp_rewrite-&gt;iis7_url_rewrite_rules(true)); ?&gt;&lt;/textarea&gt;&lt;/p&gt;
</del><ins>+        &lt;p&gt;&lt;textarea rows=&quot;18&quot; class=&quot;large-text readonly&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_textarea( $wp_rewrite-&gt;iis7_url_rewrite_rules(true) ); ?&gt;&lt;/textarea&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;/form&gt;
</span><span class="cx"> &lt;p&gt;&lt;?php _e('If you temporarily make your site&amp;#8217;s root directory writable for us to generate the &lt;code&gt;web.config&lt;/code&gt; file automatically, do not forget to revert the permissions after the file has been created.')  ?&gt;&lt;/p&gt;
</span><span class="cx">                 &lt;?php endif; ?&gt;
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> &lt;p&gt;&lt;?php _e('If your &lt;code&gt;.htaccess&lt;/code&gt; file were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so these are the mod_rewrite rules you should have in your &lt;code&gt;.htaccess&lt;/code&gt; file. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all.') ?&gt;&lt;/p&gt;
</span><span class="cx"> &lt;form action=&quot;options-permalink.php&quot; method=&quot;post&quot;&gt;
</span><span class="cx"> &lt;?php wp_nonce_field('update-permalink') ?&gt;
</span><del>-        &lt;p&gt;&lt;textarea rows=&quot;6&quot; class=&quot;large-text readonly&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html($wp_rewrite-&gt;mod_rewrite_rules()); ?&gt;&lt;/textarea&gt;&lt;/p&gt;
</del><ins>+        &lt;p&gt;&lt;textarea rows=&quot;6&quot; class=&quot;large-text readonly&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_textarea( $wp_rewrite-&gt;mod_rewrite_rules() ); ?&gt;&lt;/textarea&gt;&lt;/p&gt;
</ins><span class="cx"> &lt;/form&gt;
</span><span class="cx">         &lt;?php endif; ?&gt;
</span><span class="cx"> &lt;?php endif; ?&gt;
</span></span></pre></div>
<a id="trunkwpadminoptionswritingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-writing.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-writing.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/options-writing.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;p&gt;&lt;label for=&quot;ping_sites&quot;&gt;&lt;?php _e('When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see &lt;a href=&quot;http://codex.wordpress.org/Update_Services&quot;&gt;Update Services&lt;/a&gt; on the Codex. Separate multiple service &lt;abbr title=&quot;Universal Resource Locator&quot;&gt;URL&lt;/abbr&gt;s with line breaks.') ?&gt;&lt;/label&gt;&lt;/p&gt;
</span><span class="cx"> 
</span><del>-&lt;textarea name=&quot;ping_sites&quot; id=&quot;ping_sites&quot; class=&quot;large-text code&quot; rows=&quot;3&quot;&gt;&lt;?php form_option('ping_sites'); ?&gt;&lt;/textarea&gt;
</del><ins>+&lt;textarea name=&quot;ping_sites&quot; id=&quot;ping_sites&quot; class=&quot;large-text code&quot; rows=&quot;3&quot;&gt;&lt;?php esc_textarea( get_option('ping_sites') ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;?php else : ?&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/options.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">         &lt;th scope='row'&gt;&lt;label for='$name'&gt;&quot; . esc_html( $option-&gt;option_name ) . &quot;&lt;/label&gt;&lt;/th&gt;
</span><span class="cx"> &lt;td&gt;&quot;;
</span><span class="cx">         if ( strpos( $value, &quot;\n&quot; ) !== false )
</span><del>-                echo &quot;&lt;textarea class='$class' name='$name' id='$name' cols='30' rows='5'&gt;&quot; . wp_htmledit_pre( $value ) . &quot;&lt;/textarea&gt;&quot;;
</del><ins>+                echo &quot;&lt;textarea class='$class' name='$name' id='$name' cols='30' rows='5'&gt;&quot; . esc_textarea( $value ) . &quot;&lt;/textarea&gt;&quot;;
</ins><span class="cx">         else
</span><span class="cx">                 echo &quot;&lt;input class='regular-text $class' type='text' name='$name' id='$name' value='&quot; . esc_attr( $value ) . &quot;'&quot; . disabled( $disabled, true, false ) . &quot; /&gt;&quot;;
</span><span class="cx">         echo &quot;&lt;/td&gt;
</span></span></pre></div>
<a id="trunkwpadminplugineditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugin-editor.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugin-editor.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/plugin-editor.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        $content = htmlspecialchars( $content );
</del><ins>+        $content = esc_textarea( $content );
</ins><span class="cx">         ?&gt;
</span><span class="cx"> &lt;?php if (isset($_GET['a'])) : ?&gt;
</span><span class="cx">  &lt;div id=&quot;message&quot; class=&quot;updated&quot;&gt;&lt;p&gt;&lt;?php _e('File edited successfully.') ?&gt;&lt;/p&gt;&lt;/div&gt;
</span></span></pre></div>
<a id="trunkwpadminpressthisphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/press-this.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/press-this.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/press-this.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">                         &lt;div class=&quot;postbox&quot;&gt;
</span><span class="cx">                                 &lt;h2&gt;&lt;label for=&quot;embed-code&quot;&gt;&lt;?php _e('Embed Code') ?&gt;&lt;/label&gt;&lt;/h2&gt;
</span><span class="cx">                                 &lt;div class=&quot;inside&quot;&gt;
</span><del>-                                        &lt;textarea name=&quot;embed-code&quot; id=&quot;embed-code&quot; rows=&quot;8&quot; cols=&quot;40&quot;&gt;&lt;?php echo wp_htmledit_pre( $selection ); ?&gt;&lt;/textarea&gt;
</del><ins>+                                        &lt;textarea name=&quot;embed-code&quot; id=&quot;embed-code&quot; rows=&quot;8&quot; cols=&quot;40&quot;&gt;&lt;?php echo esc_textarea( $selection ); ?&gt;&lt;/textarea&gt;
</ins><span class="cx">                                         &lt;p id=&quot;options&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;select button&quot;&gt;&lt;?php _e('Insert Video'); ?&gt;&lt;/a&gt; &lt;a href=&quot;#&quot; class=&quot;close button&quot;&gt;&lt;?php _e('Cancel'); ?&gt;&lt;/a&gt;&lt;/p&gt;
</span><span class="cx">                                 &lt;/div&gt;
</span><span class="cx">                         &lt;/div&gt;
</span></span></pre></div>
<a id="trunkwpadminthemeeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/theme-editor.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/theme-editor.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/theme-editor.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">                         $docs_select .= '&lt;/select&gt;';
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                $content = htmlspecialchars( $content );
</del><ins>+                $content = esc_textarea( $content );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         ?&gt;
</span></span></pre></div>
<a id="trunkwpadminusereditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/user-edit.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/user-edit.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-admin/user-edit.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx"> &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx"> &lt;tr&gt;
</span><span class="cx">         &lt;th&gt;&lt;label for=&quot;description&quot;&gt;&lt;?php _e('Biographical Info'); ?&gt;&lt;/label&gt;&lt;/th&gt;
</span><del>-        &lt;td&gt;&lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;5&quot; cols=&quot;30&quot;&gt;&lt;?php echo esc_html($profileuser-&gt;description); ?&gt;&lt;/textarea&gt;&lt;br /&gt;
</del><ins>+        &lt;td&gt;&lt;textarea name=&quot;description&quot; id=&quot;description&quot; rows=&quot;5&quot; cols=&quot;30&quot;&gt;&lt;?php echo esc_textarea( $profileuser-&gt;description ); ?&gt;&lt;/textarea&gt;&lt;br /&gt;
</ins><span class="cx">         &lt;span class=&quot;description&quot;&gt;&lt;?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?&gt;&lt;/span&gt;&lt;/td&gt;
</span><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesdefaultwidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-widgets.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-widgets.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-includes/default-widgets.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -399,7 +399,7 @@
</span><span class="cx">         function form( $instance ) {
</span><span class="cx">                 $instance = wp_parse_args( (array) $instance, array( 'title' =&gt; '', 'text' =&gt; '' ) );
</span><span class="cx">                 $title = strip_tags($instance['title']);
</span><del>-                $text = format_to_edit($instance['text']);
</del><ins>+                $text = esc_textarea($instance['text']);
</ins><span class="cx"> ?&gt;
</span><span class="cx">                 &lt;p&gt;&lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;&quot;&gt;&lt;?php _e('Title:'); ?&gt;&lt;/label&gt;
</span><span class="cx">                 &lt;input class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('title'); ?&gt;&quot; type=&quot;text&quot; value=&quot;&lt;?php echo esc_attr($title); ?&gt;&quot; /&gt;&lt;/p&gt;
</span></span></pre></div>
<a id="trunkwpincludesformattingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/formatting.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/formatting.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-includes/formatting.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -2353,6 +2353,19 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Escaping for textarea values.
+ *
+ * @since 3.1
+ *
+ * @param string $text
+ * @return string
+ */
+function esc_textarea( $text ) {
+        $safe_text = htmlspecialchars( $text );
+        return apply_filters( 'esc_textarea', $safe_text, $text );
+}
+
+/**
</ins><span class="cx">  * Escape a HTML tag name.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (16430 => 16431)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2010-11-17 17:10:50 UTC (rev 16430)
+++ trunk/wp-includes/post.php        2010-11-17 17:12:01 UTC (rev 16431)
</span><span class="lines">@@ -5123,7 +5123,7 @@
</span><span class="cx">                         'capability' =&gt; '',
</span><span class="cx">                         'output' =&gt; '&lt;h4 id=&quot;%s-content-label&quot;&gt;&lt;label for=&quot;content&quot;&gt;'. __('Content') .'&lt;/label&gt;&lt;/h4&gt;
</span><span class="cx">                 &lt;div class=&quot;textarea-wrap&quot;&gt;
</span><del>-                        &lt;textarea name=&quot;content&quot; id=&quot;%s-content&quot; class=&quot;mceEditor&quot; rows=&quot;3&quot; cols=&quot;15&quot; tabindex=&quot;%d&quot;&gt;'. $post-&gt;post_content.'&lt;/textarea&gt;
</del><ins>+                        &lt;textarea name=&quot;content&quot; id=&quot;%s-content&quot; class=&quot;mceEditor&quot; rows=&quot;3&quot; cols=&quot;15&quot; tabindex=&quot;%d&quot;&gt;'. esc_textarea( $post-&gt;post_content ) .'&lt;/textarea&gt;
</ins><span class="cx">                 &lt;/div&gt;
</span><span class="cx">                         '.&quot;     &lt;script type='text/javascript'&gt;edCanvas = document.getElementById('content');edInsertContent = null;&lt;/script&gt;
</span><span class="cx">                 &quot;
</span></span></pre>
</div>
</div>

</body>
</html>