Skip to content

Problem rendering a field with special chars #231

@pitbulk

Description

@pitbulk

I'm trying to have special chars as ' in the name, but when I render it in the user_detail view, the field is showed wrong.

Expected

<input type="text" class="form-control" name="title" autocomplete="off" value="Pepe' Grillo"="" placeholder="Please enter the user name" data-validate="{&quot;minLength&quot;:1,&quot;maxLength&quot;:25,&quot;label&quot;:&quot;Username&quot;}" disabled="">

what I got

<input type="text" class="form-control" name="title" autocomplete="off" value="Pepe" Grillo'="" placeholder="Please enter the user name" data-validate="{&quot;minLength&quot;:1,&quot;maxLength&quot;:25,&quot;label&quot;:&quot;Username&quot;}" disabled="">

To solve that I found a easy trick, here

replace

        $input = "
            <div class='input-group'>
                    <span class='input-group-addon'>{{addon}}</span>
                    <input type='text' class='form-control' name='{{name}}' autocomplete='off' value='{{value}}' placeholder='{{placeholder}}' data-validate='{{validator_str}}' {{disabled}}>
            </div>";

by

        $input = '
            <div class="input-group">
                    <span class="input-group-addon">{{addon}}</span>
                    <input type="text" class="form-control" name="{{name}}" autocomplete="off" value="{{value}}" placeholder="{{placeholder}}" data-validate="{{validator_str}}" {{disabled}}>
            </div>';

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions