diff --git a/user/profile/field/social/classes/helper.php b/user/profile/field/social/classes/helper.php index 677e2eb2025..fb3124c0e25 100644 --- a/user/profile/field/social/classes/helper.php +++ b/user/profile/field/social/classes/helper.php @@ -66,9 +66,9 @@ class helper { */ public static function get_network_urls(): array { return [ - 'skype' => '%%DATA%%', - 'icq' => '%%DATA%%', - 'url' => '%%DATA%%' + 'skype' => '%%PLAIN%%', + 'icq' => '%%PLAIN%%', + 'url' => '%%PLAIN%%' ]; } } diff --git a/user/profile/field/social/field.class.php b/user/profile/field/social/field.class.php index ad44f233e8d..f92f9f2d1b2 100644 --- a/user/profile/field/social/field.class.php +++ b/user/profile/field/social/field.class.php @@ -63,7 +63,9 @@ class profile_field_social extends profile_field_base { $networkurls = profilefield_social\helper::get_network_urls(); if (array_key_exists($network, $networkurls)) { - return str_replace('%%DATA%%', $this->data, $networkurls[$network]); + $pattern = ['%%ENCODED%%', '%%PLAIN%%']; + $data = [rawurlencode($this->data), $this->data]; + return str_replace($pattern, $data, $networkurls[$network]); } return $this->data;