Skip to content

ClientValidation broken with script tag in attribute label #19462

@luke-

Description

@luke-

What steps will reproduce the problem?

  • Create a form and model with attribute label e.g. Test Label<script>alert("1")</script>
  • Without enableClientValidation the attribute label is properly encoded
  • With enableClientValidation a script alert is shown and broken HTML appears

Additional info

Q A
Yii version 2.0.latest
PHP version any
Operating system any

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions