diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2017-08-03 22:20:33 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2017-08-03 22:23:08 +0200 |
| commit | 342a7cbd55829283663ad6ba29f924eeb53fca38 (patch) | |
| tree | e27528be8b9a8f3579778e129129d1d5c00a69ba | |
| parent | f7d387f93c421e93ef13375bd5e0fb408e921598 (diff) | |
| download | forums-342a7cbd55829283663ad6ba29f924eeb53fca38.tar forums-342a7cbd55829283663ad6ba29f924eeb53fca38.tar.gz forums-342a7cbd55829283663ad6ba29f924eeb53fca38.tar.bz2 forums-342a7cbd55829283663ad6ba29f924eeb53fca38.tar.xz forums-342a7cbd55829283663ad6ba29f924eeb53fca38.zip | |
[ticket/security/211] Allow make_clickable() again after change to regex
SECURITY-211
| -rw-r--r-- | phpBB/phpbb/profilefields/type/type_string_common.php | 1 | ||||
| -rw-r--r-- | phpBB/phpbb/profilefields/type/type_url.php | 2 | ||||
| -rw-r--r-- | tests/profilefields/type_string_test.php | 4 |
3 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php index 2648d03930..f5e1992044 100644 --- a/phpBB/phpbb/profilefields/type/type_string_common.php +++ b/phpBB/phpbb/profilefields/type/type_string_common.php @@ -108,6 +108,7 @@ abstract class type_string_common extends type_base return null; } + $field_value = make_clickable($field_value); $field_value = censor_text($field_value); $field_value = bbcode_nl2br($field_value); return $field_value; diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php index 7bdd60e19d..37815b66a5 100644 --- a/phpBB/phpbb/profilefields/type/type_url.php +++ b/phpBB/phpbb/profilefields/type/type_url.php @@ -82,8 +82,6 @@ class type_url extends type_string return null; } - $field_value = make_clickable($field_value); - return parent::get_profile_value($field_value, $field_data); } } diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php index 43f88c01ae..9709b48470 100644 --- a/tests/profilefields/type_string_test.php +++ b/tests/profilefields/type_string_test.php @@ -273,8 +273,8 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case array( 'http://foobar.com', array('field_show_novalue' => false), - 'http://foobar.com', - 'Field should output the given value but not make it clickable', + '<!-- l --><a class="postlink-local" href="http://foobar.com">foobar.com</a><!-- l -->', + 'Field should output the given value and make it clickable', ), array( 'javascript://foobar.com', |
