Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 399
Zeile 14... Zeile 14...
14
    protected static $skipCallbacks = [];
14
    protected static $skipCallbacks = [];
Zeile 15... Zeile 15...
15
 
15
 
16
    /**
16
    /**
17
     * The attributes that should not be trimmed.
17
     * The attributes that should not be trimmed.
18
     *
18
     *
19
     * @var array
19
     * @var array<int, string>
20
     */
20
     */
21
    protected $except = [
21
    protected $except = [
22
        //
22
        //
Zeile 51... Zeile 51...
51
    {
51
    {
52
        if (in_array($key, $this->except, true) || ! is_string($value)) {
52
        if (in_array($key, $this->except, true) || ! is_string($value)) {
53
            return $value;
53
            return $value;
54
        }
54
        }
Zeile 55... Zeile 55...
55
 
55
 
56
        return preg_replace('~^[\s​]+|[\s​]+$~u', '', $value) ?? trim($value);
56
        return preg_replace('~^[\s\x{FEFF}\x{200B}]+|[\s\x{FEFF}\x{200B}]+$~u', '', $value) ?? trim($value);
Zeile 57... Zeile 57...
57
    }
57
    }
58
 
58
 
59
    /**
59
    /**