Administration: Remove empty form `action` attributes.

Remove the `action` attribute in the login language selector, privacy forms, and classic widget forms.

An empty `action` attribute is invalid HTML4 and unsupported HTML5. The `action` attribute is optional, but must have a valid URL when provided.

Props Malae, audrasjb, bartkleinreesink, nicolefurlan, shubhamsedani, costdev, peterwilsoncc, rajinsharwar, joedolson.
Fixes #58226.
Built from https://develop.svn.wordpress.org/trunk@57295


git-svn-id: http://core.svn.wordpress.org/trunk@56801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2024-01-16 17:31:13 +00:00
parent 14263ea394
commit cb1e71aa25
4 changed files with 5 additions and 5 deletions

View File

@ -270,7 +270,7 @@ wp_admin_notice(
</label> </label>
</th> </th>
<td> <td>
<form class="wp-create-privacy-page" method="post" action=""> <form class="wp-create-privacy-page" method="post">
<input type="hidden" name="action" value="create-privacy-page" /> <input type="hidden" name="action" value="create-privacy-page" />
<?php <?php
wp_nonce_field( 'create-privacy-page' ); wp_nonce_field( 'create-privacy-page' );
@ -293,7 +293,7 @@ wp_admin_notice(
</label> </label>
</th> </th>
<td> <td>
<form method="post" action=""> <form method="post">
<input type="hidden" name="action" value="set-privacy-page" /> <input type="hidden" name="action" value="set-privacy-page" />
<?php <?php
wp_dropdown_pages( wp_dropdown_pages(

View File

@ -478,7 +478,7 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
<?php if ( $is_inactive_widgets ) { ?> <?php if ( $is_inactive_widgets ) { ?>
<div class="remove-inactive-widgets"> <div class="remove-inactive-widgets">
<form action="" method="post"> <form method="post">
<p> <p>
<?php <?php
$attributes = array( 'id' => 'inactive-widgets-control-remove' ); $attributes = array( 'id' => 'inactive-widgets-control-remove' );

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.5-alpha-57294'; $wp_version = '6.5-alpha-57295';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -364,7 +364,7 @@ function login_footer( $input_id = '' ) {
if ( ! empty( $languages ) ) { if ( ! empty( $languages ) ) {
?> ?>
<div class="language-switcher"> <div class="language-switcher">
<form id="language-switcher" action="" method="get"> <form id="language-switcher" method="get">
<label for="language-switcher-locales"> <label for="language-switcher-locales">
<span class="dashicons dashicons-translation" aria-hidden="true"></span> <span class="dashicons dashicons-translation" aria-hidden="true"></span>