<commit_before><?php
class Vps_Form_Field_UrlField extends Vps_Form_Field_TextField
{
    public function __construct($field_name = null, $field_label = null)
    {
        parent::__construct($field_name, $field_label);
        $this->setVtype('url');
    }

    protected function _processLoaded($value)
    {
        $value = parent::_processLoaded($value);
        $punycode = new Vps_Util_Punycode();
        $value = $punycode->decode($value);
        return $value;
    }

    protected function _getValueFromPostData($postData)
    {
        $ret = parent::_getValueFromPostData($postData);
        $punycode = new Vps_Util_Punycode();
        $ret = $punycode->encode($ret);
        return $ret;
    }
}<commit_msg>UrlField: Punycode nur decoden wenn url eingegeben<commit_after><?php
class Vps_Form_Field_UrlField extends Vps_Form_Field_TextField
{
    public function __construct($field_name = null, $field_label = null)
    {
        parent::__construct($field_name, $field_label);
        $this->setVtype('url');
    }

    protected function _processLoaded($value)
    {
        $value = parent::_processLoaded($value);
        if ($value != 'http://') {
            $punycode = new Vps_Util_Punycode();
            $value = $punycode->decode($value);
        }
        return $value;
    }

    protected function _getValueFromPostData($postData)
    {
        $ret = parent::_getValueFromPostData($postData);
        $punycode = new Vps_Util_Punycode();
        $ret = $punycode->encode($ret);
        return $ret;
    }
}
{'fraction_non_alphanumeric': 0.12548764629388817, 'fraction_numerical': 0.0, 'mean_word_length': 2.9767441860465116, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '7431157', 'n_tokens_mistral': 488, 'n_tokens_neox': 481, 'n_words': 85}