From: Marcel Werk Date: Thu, 6 Aug 2020 20:35:54 +0000 (+0200) Subject: Use of StringUtil::getAnchorTag() X-Git-Tag: 5.3.0_Alpha_1~83^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f37174dd272432f9cb0ce3f9036e7146039c6a08;p=GitHub%2FWoltLab%2FWCF.git Use of StringUtil::getAnchorTag() --- 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); } }