aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_profile_fields.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_profile_fields.php')
-rw-r--r--phpBB/includes/functions_profile_fields.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index f3ebe429cd..cbad80e28e 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -176,7 +176,7 @@ class custom_profile
if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
{
- $field_validate = ($field_type == FIELD_STRING) ? $field_value : str_replace("\n", ' ', $field_value);
+ $field_validate = ($field_type == FIELD_STRING) ? $field_value : bbcode_nl2br($field_value);
if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate))
{
return 'FIELD_INVALID_CHARS';
@@ -462,7 +462,7 @@ class custom_profile
$value = make_clickable($value);
$value = censor_text($value);
- $value = str_replace("\n", '<br />', $value);
+ $value = bbcode_nl2br($value);
return $value;
break;