diff options
author | cash <cash.costello@gmail.com> | 2013-03-15 11:18:05 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-03-15 11:18:05 -0400 |
commit | a2ecf54d56d9f877e6f0f8ac6d841cee6187aac4 (patch) | |
tree | ccd5b6029d3f77cc09144132d12fbd2c2e2b0fa4 /engine/classes/ElggTranslit.php | |
parent | 4cd8bc8d68008f509ce97b2e31e1e5ccfec7bdf0 (diff) | |
download | elgg-a2ecf54d56d9f877e6f0f8ac6d841cee6187aac4.tar.gz elgg-a2ecf54d56d9f877e6f0f8ac6d841cee6187aac4.tar.bz2 |
more coding standard fixes
Diffstat (limited to 'engine/classes/ElggTranslit.php')
-rw-r--r-- | engine/classes/ElggTranslit.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/engine/classes/ElggTranslit.php b/engine/classes/ElggTranslit.php index 79116fc01..601965c11 100644 --- a/engine/classes/ElggTranslit.php +++ b/engine/classes/ElggTranslit.php @@ -58,15 +58,15 @@ class ElggTranslit { // remove all ASCII except 0-9a-zA-Z, hyphen, underscore, and whitespace // note: "x" modifier did not work with this pattern. $string = preg_replace('~[' - . '\x00-\x08' # control chars - . '\x0b\x0c' # vert tab, form feed - . '\x0e-\x1f' # control chars - . '\x21-\x2c' # ! ... , - . '\x2e\x2f' # . slash - . '\x3a-\x40' # : ... @ - . '\x5b-\x5e' # [ ... ^ - . '\x60' # ` - . '\x7b-\x7f' # { ... DEL + . '\x00-\x08' // control chars + . '\x0b\x0c' // vert tab, form feed + . '\x0e-\x1f' // control chars + . '\x21-\x2c' // ! ... , + . '\x2e\x2f' // . slash + . '\x3a-\x40' // : ... @ + . '\x5b-\x5e' // [ ... ^ + . '\x60' // ` + . '\x7b-\x7f' // { ... DEL . ']~', '', $string); $string = strtr($string, '', ''); @@ -80,10 +80,10 @@ class ElggTranslit { // note: we cannot use [^0-9a-zA-Z] because that matches multibyte chars. // note: "x" modifier did not work with this pattern. $pattern = '~[' - . '\x00-\x2f' # controls ... slash - . '\x3a-\x40' # : ... @ - . '\x5b-\x60' # [ ... ` - . '\x7b-\x7f' # { ... DEL + . '\x00-\x2f' // controls ... slash + . '\x3a-\x40' // : ... @ + . '\x5b-\x60' // [ ... ` + . '\x7b-\x7f' // { ... DEL . ']+~x'; // ['internationalization', 'and', '日本語'] |