<commit_before><h1>Register</h1>

<?php
if (!$this->enableRegistration) {
    print "Registration is disabled";
    return;
}
$form = $this->registerForm;
$form->prepare();
$form->setAttribute('action', $this->url('zfcuser/register'));
$form->setAttribute('method', 'post');
?>

<?php echo $this->form()->openTag($form) ?>
    <dl class="zend_form">
    <?php foreach ($form as $element): ?>
        <?php if (!$element instanceof Zend\Form\Element\Button): ?>
            <dt><?php echo $this->formLabel($element) ?></dt>
        <?php endif ?>
        <?php if ($element instanceof Zend\Form\Element\Button): ?>
            <dd><?php echo $this->formButton($element) ?></dd>
        <?php elseif ($element instanceof Zend\Form\Element\Captcha): ?>
            <dd><?php echo $this->formCaptcha($element) . $this->formElementErrors($element) ?></dd>
        <?php else: ?>
            <dd><?php echo $this->formInput($element) . $this->formElementErrors($element) ?></dd>
        <?php endif ?>
    <?php endforeach ?>
    </dl>
    <?php if ($this->redirect): ?>
        <input type="hidden" name="redirect" value="<?php echo $this->redirect ?>" />
    <?php endif ?>
<?php echo $this->form()->closeTag() ?><commit_msg>Fixed XSS leak in register form<commit_after><h1>Register</h1>

<?php
if (!$this->enableRegistration) {
    print "Registration is disabled";
    return;
}
$form = $this->registerForm;
$form->prepare();
$form->setAttribute('action', $this->url('zfcuser/register'));
$form->setAttribute('method', 'post');
?>

<?php echo $this->form()->openTag($form) ?>
    <dl class="zend_form">
    <?php foreach ($form as $element): ?>
        <?php if (!$element instanceof Zend\Form\Element\Button): ?>
            <dt><?php echo $this->formLabel($element) ?></dt>
        <?php endif ?>
        <?php if ($element instanceof Zend\Form\Element\Button): ?>
            <dd><?php echo $this->formButton($element) ?></dd>
        <?php elseif ($element instanceof Zend\Form\Element\Captcha): ?>
            <dd><?php echo $this->formCaptcha($element) . $this->formElementErrors($element) ?></dd>
        <?php else: ?>
            <dd><?php echo $this->formInput($element) . $this->formElementErrors($element) ?></dd>
        <?php endif ?>
    <?php endforeach ?>
    </dl>
    <?php if ($this->redirect): ?>
        <input type="hidden" name="redirect" value="<?php echo $this->escapeHtml($this->redirect) ?>" />
    <?php endif ?>
<?php echo $this->form()->closeTag() ?>
{'fraction_non_alphanumeric': 0.21661960467930616, 'fraction_numerical': 0.0016135538523598225, 'mean_word_length': 3.4364937388193204, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 102, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3810815', 'n_tokens_mistral': 743, 'n_tokens_neox': 758, 'n_words': 169}