Skip to content

[ZF2] placeholder, value attributes in form doesn't show cyrillic #6

@weierophinney

Description

@weierophinney

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7681
User: @mkEmperor
Created On: 2016-03-03T15:20:23Z
Updated At: 2016-03-07T02:09:36Z
Body
$this->add(array( 'name' => 'name', 'attributes' => array( 'type' => 'text', ), 'options' => array( 'label' => 'Имя', ), 'attributes' => array( 'required' => 'required', 'placeholder' => 'Имя' ), ));
$this->add(array( 'name' => 'submit', 'attributes' => array( 'type' => 'submit', 'value' =>'Зарегестрироваться' ) ));

in form
<input name="name" required="required" placeholder="&#xD098;&#xD0BC;&#xD18F;" type="text" value="">
<input name="submit" type="submit" value="&#xD097;&#xD0B0;&#xD180;&#xD0B5;&#xD0B3;&#xD0B5;&#xD181;&#xD182;&#xD180;&#xD0B8;&#xD180;&#xD0BE;&#xD0B2;&#xD0B0;&#xD182;&#xD18C;&#xD181;&#xD18F;">


Comment

User: @mkEmperor
Created On: 2016-03-03T15:22:46Z
Updated At: 2016-03-03T15:22:46Z
Body
Project and all files in utf-8


Comment

User: @mkEmperor
Created On: 2016-03-03T16:10:36Z
Updated At: 2016-03-03T16:11:01Z
Body
public function escapeHtmlAttr($string) { $string = $this->toUtf8($string); if ($string === '' || ctype_digit($string)) { return $string; } $result = preg_replace_callback('/[^a-z0-9,\.\-_]/iSu', $this->htmlAttrMatcher, $string); return $this->fromUtf8($result); }

correct '/[^a-zа-яА-я0-9,.-_]/iSu'



Originally posted by @GeeH at zendframework/zend-escaper#16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions