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 '<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>';
+ return StringUtil::getAnchorTag('https://www.facebook.com/'.$value, $value);
}
}
public function getOutput(User $user, UserOption $option, $value) {
if (empty($value)) return '';
- $url = StringUtil::encodeHTML('https://twitter.com/'.$value);
- $value = StringUtil::encodeHTML($value);
-
- 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>';
+ return StringUtil::getAnchorTag('https://twitter.com/'.$value, $value);
}
}