CoreFiles by mySites.guru
url.php29 lines, 546 bytes, from Joomla_3.10.3-Stable-Full_Package.zip
Raw History Compare with 3.10.2
md5
7171fede5f393b07c25046e0b3797377
sha1
aba04fa0b8fb79765c29c4769f4f52de04400e2b
sha256
8f3a4fdfa85afbbd86cc1be90e2482836eb2e2c5359a96353ab9cdc4e966a0b6
<?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 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.