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

Bug: Double use esc function with form_input and etc... #2443

Closed
MashinaMashina opened this issue Dec 7, 2019 · 0 comments
Closed

Bug: Double use esc function with form_input and etc... #2443

MashinaMashina opened this issue Dec 7, 2019 · 0 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@MashinaMashina
Copy link
Contributor

MashinaMashina commented Dec 7, 2019

Describe the bug
Code:

$data = [
	'name'  => 'field',
	'value' => set_value('field'),
];

echo form_input($data);
  1. Enter <h1>Hello</h1> to field and submit.
  2. In input you see "&lt;h1&gt;Hello&lt;/h1&gt;" instead your value
  3. If you again submit, you see "&amp;lt;h1&amp;gt;Hello&amp;lt;/h1&amp;gt;"
  4. After you can see "&amp;amp;amp;lt;h1&amp;amp;amp;gt;Hello&amp;amp;amp;lt;/h1&amp;amp;amp;gt;" and etc

Such behavior because CI4 use esc() in set_value() and in form_input (parse_form_attributes).

@MashinaMashina MashinaMashina added the bug Verified issues on the current code behavior or pull requests that will fix them label Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

1 participant