Make WordPress Core

Changeset 57295


Ignore:
Timestamp:
01/16/2024 05:29:58 PM (11 months ago)
Author:
joedolson
Message:

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.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-privacy.php

    r56570 r57295  
    271271            </th>
    272272            <td>
    273                 <form class="wp-create-privacy-page" method="post" action="">
     273                <form class="wp-create-privacy-page" method="post">
    274274                    <input type="hidden" name="action" value="create-privacy-page" />
    275275                    <?php
     
    294294            </th>
    295295            <td>
    296                 <form method="post" action="">
     296                <form method="post">
    297297                    <input type="hidden" name="action" value="set-privacy-page" />
    298298                    <?php
  • trunk/src/wp-admin/widgets-form.php

    r56573 r57295  
    479479                <?php if ( $is_inactive_widgets ) { ?>
    480480                <div class="remove-inactive-widgets">
    481                     <form action="" method="post">
     481                    <form method="post">
    482482                        <p>
    483483                            <?php
  • trunk/src/wp-login.php

    r57142 r57295  
    365365            ?>
    366366            <div class="language-switcher">
    367                 <form id="language-switcher" action="" method="get">
     367                <form id="language-switcher" method="get">
    368368
    369369                    <label for="language-switcher-locales">
Note: See TracChangeset for help on using the changeset viewer.