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

Missing escape of single quote. PHP Parse error produced. #105

Closed
dfelton opened this issue Oct 13, 2015 · 4 comments
Closed

Missing escape of single quote. PHP Parse error produced. #105

dfelton opened this issue Oct 13, 2015 · 4 comments
Labels

Comments

@dfelton
Copy link
Contributor

dfelton commented Oct 13, 2015

When the "Note" attribute of an entity's field/attribute contains single quote(s), they are not being escaped when put into the corresponding instance of the Varien_Data_Form_Element_Abstract element for the field/attribute. This results in an improperly ended string, producing a PHP Parse error.

img1

app/code/{{codepool}}/{{Namespace}}/{{Module}}/Block/Adminhtml/{{Entity}}/Edit/Form.php
Example Generated Source:

$fieldset->addField(
    'foo_bar',
    'text',
    array(
        'label' => Mage::helper('foo_bar')->__('Foo Bar'),
        'name'  => 'foo_bar',
        'note'  => $this->__('Foo's Bar'),
        'required'  => true,
        'class' => 'required-entry',
    )
);
@tzyganu tzyganu added the bug label Oct 14, 2015
@tzyganu
Copy link
Owner

tzyganu commented Oct 14, 2015

Thanks for spotting this. I will fix it as soon as I have the time. Of course your PR is always welcomed 😄

@dfelton
Copy link
Contributor Author

dfelton commented Oct 14, 2015

@tzyganu your welcome. Yes if I have time first I'll dig into it as well. Oh how I wish there was 48 hours in a day, and the human body was built to handle such hours.

@fffab
Copy link

fffab commented Oct 19, 2015

Hi, @tzyganu @dfelton i did just spotted the same on 'label'. For example
'label' => Mage::helper('foo_bar')->__('Foo's Bar'),

@tzyganu
Copy link
Owner

tzyganu commented Oct 27, 2015

@dfelton @fffab These issues should be fixed in version 1.9.6.0

@tzyganu tzyganu closed this as completed Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants