diff options
-rw-r--r-- | modules/filter/filter.test | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/filter/filter.test b/modules/filter/filter.test index 1a21ecbbd..5471f2da3 100644 --- a/modules/filter/filter.test +++ b/modules/filter/filter.test @@ -1195,6 +1195,11 @@ class FilterUnitTestCase extends DrupalUnitTestCase { // - absolute, mail, partial // - characters/encoding, surrounding markup, security + // Create a e-mail that is too long. + $long_email = str_repeat('a', 254) . '@example.com'; + $too_long_email = str_repeat('b', 255) . '@example.com'; + + // Filter selection/pattern matching. $tests = array( // HTTP URLs. @@ -1206,10 +1211,12 @@ http://example.com or www.example.com ), // MAILTO URLs. ' -person@example.com or mailto:person2@example.com +person@example.com or mailto:person2@example.com or ' . $long_email . ' but not ' . $too_long_email . ' ' => array( '<a href="mailto:person@example.com">person@example.com</a>' => TRUE, '<a href="mailto:person2@example.com">mailto:person2@example.com</a>' => TRUE, + '<a href="mailto:' . $long_email . '">' . $long_email . '</a>' => TRUE, + '<a href="mailto:' . $too_long_email . '">' . $too_long_email . '</a>' => FALSE, ), // URI parts and special characters. ' |