Skip to content

Commit

Permalink
[ci skip] Fix the location of the note
Browse files Browse the repository at this point in the history
  • Loading branch information
nyufeng committed May 9, 2020
1 parent 85cd56a commit c59f5c2
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit c59f5c2

Please sign in to comment.