We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97be037 commit fb9f6ecCopy full SHA for fb9f6ec
system/Filters/InvalidChars.php
@@ -32,6 +32,13 @@ class InvalidChars implements FilterInterface
32
*/
33
protected $source;
34
35
+ /**
36
+ * Regular expressions for valid control codes
37
+ *
38
+ * @var string
39
+ */
40
+ protected $controlCodeRegex = '/\A[\r\n\t[:^cntrl:]]*\z/u';
41
+
42
/**
43
* Check invalid characters.
44
*
@@ -107,7 +114,7 @@ protected function checkControl($value)
107
114
return $value;
108
115
}
109
116
110
- if (preg_match('/\A[\r\n\t[:^cntrl:]]*\z/u', $value) === 1) {
117
+ if (preg_match($this->controlCodeRegex, $value) === 1) {
111
118
112
119
113
120
0 commit comments