From f37174dd272432f9cb0ce3f9036e7146039c6a08 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 6 Aug 2020 22:35:54 +0200 Subject: [PATCH] Use of StringUtil::getAnchorTag() --- .../system/option/user/FacebookUserOptionOutput.class.php | 5 +---- .../lib/system/option/user/TwitterUserOptionOutput.class.php | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/wcfsetup/install/files/lib/system/option/user/FacebookUserOptionOutput.class.php b/wcfsetup/install/files/lib/system/option/user/FacebookUserOptionOutput.class.php index 04a083f4dc..741eca8f00 100644 --- a/wcfsetup/install/files/lib/system/option/user/FacebookUserOptionOutput.class.php +++ b/wcfsetup/install/files/lib/system/option/user/FacebookUserOptionOutput.class.php @@ -19,9 +19,6 @@ class FacebookUserOptionOutput implements IUserOptionOutput { public function getOutput(User $user, UserOption $option, $value) { if (empty($value)) return ''; - $url = StringUtil::encodeHTML('https://www.facebook.com/'.$value); - $value = StringUtil::encodeHTML($value); - - return ''.$value.''; + return StringUtil::getAnchorTag('https://www.facebook.com/'.$value, $value); } } diff --git a/wcfsetup/install/files/lib/system/option/user/TwitterUserOptionOutput.class.php b/wcfsetup/install/files/lib/system/option/user/TwitterUserOptionOutput.class.php index 1dd36cb9ce..d9fc30ccf9 100644 --- a/wcfsetup/install/files/lib/system/option/user/TwitterUserOptionOutput.class.php +++ b/wcfsetup/install/files/lib/system/option/user/TwitterUserOptionOutput.class.php @@ -19,9 +19,6 @@ class TwitterUserOptionOutput implements IUserOptionOutput { public function getOutput(User $user, UserOption $option, $value) { if (empty($value)) return ''; - $url = StringUtil::encodeHTML('https://twitter.com/'.$value); - $value = StringUtil::encodeHTML($value); - - return ''.$value.''; + return StringUtil::getAnchorTag('https://twitter.com/'.$value, $value); } } -- 2.20.1