Skip to content
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

[ci skip] Fix the location of the note #2961

Merged
merged 1 commit into from
May 9, 2020
Merged
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
11 changes: 6 additions & 5 deletions user_guide_src/source/tutorial/news_section.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ and add the next piece of code.

<?php endif ?>


.. note:: We are again using using **esc()** to help prevent XSS attacks.
But this time we also passed "url" as a second parameter. That's because
attack patterns are different depending on the context in which the output
is used. You can read more about it :doc:`here </general/common_functions>`.

Here, each news item is looped and displayed to the user. You can see we
wrote our template in PHP mixed with HTML. If you prefer to use a template
language, you can use CodeIgniter's :doc:`View
Expand Down Expand Up @@ -261,11 +267,6 @@ The only thing left to do is create the corresponding view at
<h2><?= esc($news['title']); ?></h2>
<?= esc($news['body']); ?>

.. note:: We are again using using **esc()** to help prevent XSS attacks.
But this time we also passed "url" as a second parameter. That's because
attack patterns are different depending on the context in which the output
is used. You can read more about it :doc:`here </general/common_functions>`.

Routing
-------------------------------------------------------

Expand Down