XF 2.1 Mark local link to be external

Oersted

Member
Hi,
it looks like when XF gets a post's "message" field from db with url example it checks if that link is outside of the xen installation and if yes then it marks a link with class external and also inserts target='_blank' .. But how or if it's possible to make some posts get the bbcode with a mark that this very link is kind of specific and needs to be opened only in new tab no matter if it belongs to a local domain ?

Basically what the code does now is
Code:
$message = "<p>123</p><br /> View it on Marketplace <a href='http://xenforo1-example.com/?siisi#sadf' target='_blank'>13dea + $ 0</a><br /> Images<br /> For more listings from this seller, please see <a href='123'  target='_blank'>Seller Page</a>";
$bbCode = \XF\Html\Renderer\BbCode::renderFromHtml( nl2br( $message ) );

Maybe there is another renderer to use for getting $bbCode the way required as above?
 
Top Bottom