Skip to content

Hint message in tutorial does not correspond to the example code shown #3242

Closed
@Connum

Description

@Connum

Documentation URL:
https://codeigniter4.github.io/userguide/tutorial/news_section.html

Description:
At the end of the section Display the news, there's a note with the following message:

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 here.

However, there is no "url" parameter in the code example above that note:

<h2><?= esc($news['title']); ?></h2>
<?= esc($news['body']); ?>

So, either the parameter is missing, or the note is superfluous here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions