Skip to content

Removing self-closing slash from <input> #18667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,12 @@ To work with multi-dimensional fields:
.. code-block:: html

<form>
<input name="multi[]"/>
<input name="multi[]"/>
<input name="multi[dimensional]"/>
<input name="multi[dimensional][]" value="1"/>
<input name="multi[dimensional][]" value="2"/>
<input name="multi[dimensional][]" value="3"/>
<input name="multi[]">
<input name="multi[]">
<input name="multi[dimensional]">
<input name="multi[dimensional][]" value="1">
<input name="multi[dimensional][]" value="2">
<input name="multi[dimensional][]" value="3">
</form>

Pass an array of values::
Expand Down
2 changes: 1 addition & 1 deletion components/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ done by passing a special form "view" object to your template (notice the
{{ form_start(form) }}
{{ form_widget(form) }}

<input type="submit"/>
<input type="submit">
{{ form_end(form) }}

.. image:: /_images/form/simple-form.png
Expand Down
2 changes: 1 addition & 1 deletion form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fields, so you no longer have to deal with form themes:
value="{{ field_value(form.username) }}"
placeholder="{{ field_label(form.username) }}"
class="form-control"
/>
>

<select name="{{ field_name(form.country) }}" class="form-control">
<option value="">{{ field_label(form.country) }}</option>
Expand Down
2 changes: 1 addition & 1 deletion form/form_themes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ upon the form themes enabled in your app):

.. code-block:: html

<input type="number" id="form_age" name="form[age]" required="required" value="33"/>
<input type="number" id="form_age" name="form[age]" required="required" value="33">

Symfony uses a Twig block called ``integer_widget`` to render that field. This
is because the field type is ``integer`` and you're rendering its ``widget`` (as
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/File.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ You can find a list of existing mime types on the `IANA website`_.

When using this constraint on a :doc:`FileType field </reference/forms/types/file>`,
the value of the ``mimeTypes`` option is also used in the ``accept``
attribute of the related ``<input type="file"/>`` HTML element.
attribute of the related ``<input type="file">`` HTML element.

This behavior is applied only when using :ref:`form type guessing <form-type-guessing>`
(i.e. the form type is not defined explicitly in the ``->add()`` method of
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ EmailType Field
===============

The ``EmailType`` field is a text field that is rendered using the HTML5
``<input type="email"/>`` tag.
``<input type="email">`` tag.

+---------------------------+---------------------------------------------------------------------+
| Rendered as | ``input`` ``email`` field (a text box) |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/range.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ RangeType Field
===============

The ``RangeType`` field is a slider that is rendered using the HTML5
``<input type="range"/>`` tag.
``<input type="range">`` tag.

+---------------------------+---------------------------------------------------------------------+
| Rendered as | ``input`` ``range`` field (slider in HTML5 supported browser) |
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/search.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SearchType Field
================

This renders an ``<input type="search"/>`` field, which is a text box with
This renders an ``<input type="search">`` field, which is a text box with
special functionality supported by some browsers.

Read about the input search field at `DiveIntoHTML5.info`_
Expand Down
6 changes: 3 additions & 3 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -794,13 +794,13 @@ Finally, create or update the template:

<form action="{{ path('app_login') }}" method="post">
<label for="username">Email:</label>
<input type="text" id="username" name="_username" value="{{ last_username }}"/>
<input type="text" id="username" name="_username" value="{{ last_username }}">

<label for="password">Password:</label>
<input type="password" id="password" name="_password"/>
<input type="password" id="password" name="_password">

{# If you want to control the URL the user is redirected to on success
<input type="hidden" name="_target_path" value="/account"/> #}
<input type="hidden" name="_target_path" value="/account"> #}

<button type="submit">login</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion security/csrf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ generate a CSRF token in the template and store it as a hidden form field:

<form action="{{ url('admin_post_delete', { id: post.id }) }}" method="post">
{# the argument of csrf_token() is an arbitrary string used to generate the token #}
<input type="hidden" name="token" value="{{ csrf_token('delete-item') }}"/>
<input type="hidden" name="token" value="{{ csrf_token('delete-item') }}">

<button type="submit">Delete item</button>
</form>
Expand Down
14 changes: 7 additions & 7 deletions security/form_login.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ Defining the redirect URL via POST using a hidden form field:
<form action="{{ path('login') }}" method="post">
{# ... #}

<input type="hidden" name="_target_path" value="{{ path('account') }}"/>
<input type="submit" name="login"/>
<input type="hidden" name="_target_path" value="{{ path('account') }}">
<input type="submit" name="login">
</form>

Using the Referring URL
Expand Down Expand Up @@ -301,8 +301,8 @@ This option can also be set via the ``_failure_path`` request parameter:
<form action="{{ path('login') }}" method="post">
{# ... #}

<input type="hidden" name="_failure_path" value="{{ path('forgot_password') }}"/>
<input type="submit" name="login"/>
<input type="hidden" name="_failure_path" value="{{ path('forgot_password') }}">
<input type="submit" name="login">
</form>

Customizing the Target and Failure Request Parameters
Expand Down Expand Up @@ -380,7 +380,7 @@ are now fully customized:
<form action="{{ path('login') }}" method="post">
{# ... #}

<input type="hidden" name="go_to" value="{{ path('dashboard') }}"/>
<input type="hidden" name="back_to" value="{{ path('forgot_password') }}"/>
<input type="submit" name="login"/>
<input type="hidden" name="go_to" value="{{ path('dashboard') }}">
<input type="hidden" name="back_to" value="{{ path('forgot_password') }}">
<input type="submit" name="login">
</form>
2 changes: 1 addition & 1 deletion security/remember_me.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ checkbox must have a name of ``_remember_me``:
{# ... your form fields #}

<label>
<input type="checkbox" name="_remember_me" checked/>
<input type="checkbox" name="_remember_me" checked>
Keep me logged in
</label>

Expand Down