2 namespace wcf\system\option\user
;
3 use wcf\data\user\option\UserOption
;
4 use wcf\data\user\User
;
5 use wcf\util\StringUtil
;
8 * User option output implementation for the output of a facebook user profile.
11 * @copyright 2001-2019 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package WoltLabSuite\Core\System\Option\User
15 class FacebookUserOptionOutput
implements IUserOptionOutput
{
19 public function getOutput(User
$user, UserOption
$option, $value) {
20 if (empty($value)) return '';
22 $url = StringUtil
::encodeHTML('https://www.facebook.com/'.$value);
23 $value = StringUtil
::encodeHTML($value);
25 return '<a href="'.$url.'" class="externalURL"'.((EXTERNAL_LINK_REL_NOFOLLOW || EXTERNAL_LINK_TARGET_BLANK
) ?
(' rel="'.(EXTERNAL_LINK_REL_NOFOLLOW ?
'nofollow' : '').((EXTERNAL_LINK_REL_NOFOLLOW
&& EXTERNAL_LINK_TARGET_BLANK
) ?
' ' : '').(EXTERNAL_LINK_TARGET_BLANK ?
'noopener noreferrer' : '').'"') : '').(EXTERNAL_LINK_TARGET_BLANK ?
' target="_blank"' : '').'>'.$value.'</a>';