Idhae
Active member
Hey togther,
i have a problem with that named extension in the title.
I coded an extended \XF\Service\Message\Preparer -> public function checkValidity, where i check $message for external urls.
I use the getLinkClassTarget function from XF\Template\Templater\Formatter.
It works with that URLS:
BUT if i place a URL Tag like this:
whitout https://, the getLinkClassTarget function runs a second time and it becomes internalLink, because
$urlInfo['host'] is empty and $isInteral becomes true.
Someone have any ideas how i can fix that?
Why getLinkClassTarget runs a second time, a var_dump show me that at first run it is correct externalLink?
greetings idhae
i have a problem with that named extension in the title.
I coded an extended \XF\Service\Message\Preparer -> public function checkValidity, where i check $message for external urls.
I use the getLinkClassTarget function from XF\Template\Templater\Formatter.
It works with that URLS:
Code:
[URL]https://www.externalUrl.com[/URL]
[URL="https://www.externalUrl.com"]https://www.externalUrl.com[/URL]
[URL='https://www.externalUrl.com']https://www.externalUrl.com[/URL]
[URL='https://www.externalUrl.com']EXTERNAL-URL[/URL]
https://www.externalUrl.com
www.externalUrl.com
[URL unfurl="true"]https://www.externalUrl.com[/URL]
BUT if i place a URL Tag like this:
Code:
[URL unfurl="true"]www.externalUrl.com[/URL]
$urlInfo['host'] is empty and $isInteral becomes true.
Someone have any ideas how i can fix that?
Why getLinkClassTarget runs a second time, a var_dump show me that at first run it is correct externalLink?
greetings idhae