+ } elseif ($simple_html == self::MASTODON_API) {
+ $text = preg_replace("/([@!])\[url\=(.*?)\](.*?)\[\/url\]/ism",
+ '<a class="u-url mention status-link" href="$2" rel="nofollow noopener noreferrer" target="_blank" title="$3">$1<span>$3</span></a>',
+ $text);
+ $text = preg_replace("/([#])\[url\=(.*?)\](.*?)\[\/url\]/ism",
+ '<a class="mention hashtag status-link" href="$2" rel="tag">$1<span>$3</span></a>',
+ $text);