diff --git a/cookbook/assetic/php.rst b/cookbook/assetic/php.rst index 6a704036ec0..29782359f8c 100644 --- a/cookbook/assetic/php.rst +++ b/cookbook/assetic/php.rst @@ -113,7 +113,7 @@ First, configure a new ``scssphp`` Assetic filter: The value of the ``formatter`` option is the fully qualified class name of the formatter used by the filter to produce the compiled CSS file. Using the -compressed formatter will minimize the the resulting file, regardless of whether +compressed formatter will minimize the resulting file, regardless of whether the original files are regular CSS files or SCSS files. Next, update your Twig template to add the ``{% stylesheets %}`` tag defined diff --git a/cookbook/controller/upload_file.rst b/cookbook/controller/upload_file.rst index d374e1473f0..dccd5676773 100644 --- a/cookbook/controller/upload_file.rst +++ b/cookbook/controller/upload_file.rst @@ -156,14 +156,14 @@ There are some important things to consider in the code of the above controller: provides methods for the most common operations when dealing with uploaded files. #. A well-known security best practice is to never trust the input provided by users. This also applies to the files uploaded by your visitors. The ``Uploaded`` - class provides methods to get the original file extension (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getExtension()`), - the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getSize()`) - and the original file name (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientOriginalName()`). + class provides methods to get the original file extension (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getExtension`), + the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getSize`) + and the original file name (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientOriginalName`). However, they are considered *not safe* because a malicious user could tamper that information. That's why it's always better to generate a unique name and - use the :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::guessExtension()` + use the :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::guessExtension` method to let Symfony guess the right extension according to the file MIME type. -#. The ``UploadedFile`` class also provides a :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::move()` +#. The ``UploadedFile`` class also provides a :method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::move` method to store the file in its intended directory. Defining this directory path as an application configuration option is considered a good practice that simplifies the code: ``$this->container->getParameter('brochures_dir')``. @@ -172,6 +172,6 @@ You can now use the following code to link to the PDF brochure of an product: .. code-block:: html+jinja - View brochure (PDF) + View brochure (PDF) .. _`VichUploaderBundle`: https://github.com/dustin10/VichUploaderBundle diff --git a/cookbook/email/email.rst b/cookbook/email/email.rst index 1b966e94012..361ada048ce 100644 --- a/cookbook/email/email.rst +++ b/cookbook/email/email.rst @@ -130,7 +130,7 @@ template might look something like this: {# app/Resources/views/Emails/registration.html.twig #}

You did it! You registered!

- {# example, assuming you have a route named "login" $} + {# example, assuming you have a route named "login" #} To login, go to: .... Thanks!