Skip to content

Commit

Permalink
[JFilterInput] add some test cases with unicode chars (joomla#15914)
Browse files Browse the repository at this point in the history
* try some cases with unicode chars

* try fixing path 6 test
  • Loading branch information
photodude authored and brianteeman committed May 16, 2017
1 parent ec59336 commit fa5d762
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions tests/unit/suites/libraries/joomla/filter/JFilterInputTest.php
Expand Up @@ -416,6 +416,12 @@ public function casesGeneric()
array('images/system', '/var/www/html/index.html'),
'From generic cases'
),
'path_06' => array(
'path',
'/var/www/html/pub/diplom_labors/2016/2016_Elfimova_O_rpz.pdf',
'/var/www/html/pub/diplom_labors/2016/2016_Elfimova_O_rpz.pdf',
'From generic cases'
),
'user_01' => array(
'username',
'&<f>r%e\'d',
Expand All @@ -434,6 +440,18 @@ public function casesGeneric()
array('fred', '$user69'),
'From generic cases'
),
'user_04' => array(
'username',
'фамилия',
'фамилия',
'From generic cases'
),
'user_05' => array(
'username',
'Φρεντ',
'Φρεντ',
'From generic cases'
),
'trim_01' => array(
'trim',
'nonbreaking nonbreaking',
Expand Down Expand Up @@ -548,6 +566,12 @@ public function casesGeneric()
'<em><strong>Fred</strong></em>',
'From generic cases'
),
'Nested tags 02' => array(
'',
'<em><strong>Φρεντ</strong></em>',
'<em><strong>Φρεντ</strong></em>',
'From generic cases'
),
'Malformed Nested tags' => array(
'',
'<em><strongFred</strong></em>',
Expand Down Expand Up @@ -685,6 +709,12 @@ public function whitelist()
'Fred',
'From specific cases'
),
'Nested tags 02' => array(
'',
'<em><strong>Φρεντ</strong></em>',
'Φρεντ',
'From specific cases'
),
'Malformed Nested tags' => array(
'',
'<em><strongFred</strong></em>',
Expand Down Expand Up @@ -804,6 +834,12 @@ public function whitelistImg()
'Fred',
'From specific cases'
),
'Nested tags 02' => array(
'',
'<em><strong>Φρεντ</strong></em>',
'Φρεντ',
'From specific cases'
),
'Malformed Nested tags' => array(
'',
'<em><strongFred</strong></em>',
Expand Down Expand Up @@ -942,6 +978,12 @@ public function whitelistClass()
'Fred',
'From specific cases'
),
'Nested tags 02' => array(
'',
'<em><strong>Φρεντ</strong></em>',
'Φρεντ',
'From specific cases'
),
'Malformed Nested tags' => array(
'',
'<em><strongFred</strong></em>',
Expand Down Expand Up @@ -1050,6 +1092,12 @@ public function whitelistClassImg()
'Fred',
'From specific cases'
),
'Nested tags 02' => array(
'',
'<em><strong>Φρεντ</strong></em>',
'Φρεντ',
'From specific cases'
),
'Malformed Nested tags' => array(
'',
'<em><strongFred</strong></em>',
Expand Down

0 comments on commit fa5d762

Please sign in to comment.