Skip to content

Bootstrap.HtmlHelper introduces HTML Injection #176

@asgraf

Description

@asgraf

This is a (multiple allowed):

  • bug
  • enhancement
  • question

What you did

//This code is completely safe on orginal HtmlHelper
//Loading your HtmlHelper introduces html injection
$someUserProvidedString = 'i:tag <script>alert()</script>';
echo $this->Html->link($someUserProvidedString, $someUrl);

What happened

<i class="icon-tag "></i> <script>alert()</script>
HTML Injection!

What you expected to happen

<i class="icon-tag "></i> &lt;script&gt;alert()&lt;/script&gt;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions