Skip to content

Commit 868709a

Browse files
Users: Add missing escaping on the Add New User screen.
While the `$type` and `$label` variables are set to values that do not currently require escaping, this may change in the future, so it is preferable to add the escaping as a defensive coding measure. Follow-up to [16294], [29030]. Props monzuralam, rudlinkon, hztyfoon, peterwilsoncc. Fixes #57133. git-svn-id: https://develop.svn.wordpress.org/trunk@54857 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4b59315 commit 868709a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-admin/user-new.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@
442442

443443
<table class="form-table" role="presentation">
444444
<tr class="form-field form-required">
445-
<th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th>
446-
<td><input name="email" type="<?php echo $type; ?>" id="adduser-email" class="wp-suggest-user" value="" /></td>
445+
<th scope="row"><label for="adduser-email"><?php echo esc_html( $label ); ?></label></th>
446+
<td><input name="email" type="<?php echo esc_attr( $type ); ?>" id="adduser-email" class="wp-suggest-user" value="" /></td>
447447
</tr>
448448
<tr class="form-field">
449449
<th scope="row"><label for="adduser-role"><?php _e( 'Role' ); ?></label></th>

0 commit comments

Comments
 (0)