CoreFiles by mySites.guru
url.php29 lines, 575 bytes, from Joomla_3.10.0-alpha4-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha3
md5
ccc983896668e71582a52603a56149ce
sha1
b3c1c94822ffc3ba5c206dee7a1cea41cf60d362
sha256
cd3859bf1c2f5aefa46e378c9b863cd2a006a377cf77274320d3975dd4361522
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.URL
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

$attributes = '';

if (!JUri::isInternal($value))
{
	$attributes = ' rel="nofollow noopener noreferrer" target="_blank"';
}

echo sprintf('<a href="%s"%s>%s</a>',
	htmlspecialchars($value),
	$attributes,
	htmlspecialchars($value)
);

The same content is in 8 releases, Joomla 3.10.0-alpha4 to 3.10.0-rc2. See them all, or every version of this file.