Merge branch 'bugfix/double-escaped-field-in-create-poll' into 'release'

Correcting escaping in create_poll.php

In create_poll.php, removing of the php escaping and completion of the template ones.

See merge request !134
This commit is contained in:
Olivier Perez 2016-06-30 23:42:15 +02:00
commit 7adb14f3ef
2 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@ class Utils {
}
public static function fromPostOrDefault($postKey, $default = '') {
return !empty($_POST[$postKey]) ? Utils::htmlEscape($_POST[$postKey]) : $default;
return !empty($_POST[$postKey]) ? $_POST[$postKey] : $default;
}
public static function base64url_encode($input) {

View File

@ -42,7 +42,7 @@
<input id="customize_id" name="customize_id" type="checkbox"/>
</span>
<input id="poll_id" type="text" name="id" class="form-control" {$errors['id']['aria']}
value="{$poll_id}" aria-describedBy="pollIdDesc" disabled="disabled" maxlength="64"
value="{$poll_id|html}" aria-describedBy="pollIdDesc" disabled="disabled" maxlength="64"
pattern="[A-Za-z0-9-]+"/>
</div>
<span id="pollIdDesc" class="help-block">{__('Step 1', 'Poll id rules')}</span>
@ -104,7 +104,7 @@
{if $useRemoteUser}
<input type="hidden" name="mail" value="{$form->admin_mail}">{$form->admin_mail}
{else}
<input id="email" type="text" name="mail" class="form-control" {$errors['email']['aria']} value="{$poll_mail}" />
<input id="email" type="text" name="mail" class="form-control" {$errors['email']['aria']} value="{$poll_mail|html}" />
{/if}
</div>
</div>