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

Update Options.php #8130

Merged
merged 2 commits into from
Mar 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ protected function _addField($parameter)
}
}

$data['value'] = html_entity_decode( $data['value'] );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please use \Magento\Framework\Escaper::escapeHtmlAttr instead of native PHP library
  • there is extra space after "(", please remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The \Magento\Framework\Escaper::escapeHtmlAttr function doesn't give the desired result. html_entity_decode is used by Magento core elsewhere. See https://github.com/magento/magento2/search?utf8=✓&q=html_entity_decode&type=Code. I have removed the extra spaces.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good


// prepare element dropdown values
if ($values = $parameter->getValues()) {
// dropdown options are specified in configuration
Expand Down