PMA\libraries\plugins\transformations\abs\TextLinkTransformationsPlugin::applyTransformation PHP Метод

applyTransformation() публичный Метод

Does the actual work of each specific transformations plugin.
public applyTransformation ( string $buffer, array $options = [], string $meta = '' ) : string
$buffer string text to be transformed
$options array transformation options
$meta string meta information
Результат string
    public function applyTransformation($buffer, $options = array(), $meta = '')
    {
        $url = (isset($options[0]) ? $options[0] : '') . (isset($options[2]) && $options[2] ? '' : $buffer);
        /* Do not allow javascript links */
        if (!Sanitize::checkLink($url, true, true)) {
            return htmlspecialchars($url);
        }
        return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars(isset($options[1]) ? $options[1] : '') . '" target="_blank" rel="noopener noreferrer">' . htmlspecialchars(isset($options[1]) ? $options[1] : $buffer) . '</a>';
    }
TextLinkTransformationsPlugin