| Server IP : 46.105.57.169 / Your IP : 216.73.216.144 Web Server : Apache System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : maitricfuz ( 93378) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/maitricfuz/www/saint-martin-lg/plugins/editors-xtd/sourcerer/src/ |
Upload File : |
<?php
/**
* @package Sourcerer
* @version 12.2.8
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2026 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
namespace RegularLabs\Plugin\EditorButton\Sourcerer;
defined('_JEXEC') or die;
use RegularLabs\Library\Document as RL_Document;
use RegularLabs\Library\Plugin\EditorButtonPopup as RL_EditorButtonPopup;
use RegularLabs\Library\Input as RL_Input;
use RegularLabs\Library\RegEx as RL_RegEx;
class Popup extends RL_EditorButtonPopup
{
protected $extension = 'sourcerer';
protected $require_core_auth = false;
protected function loadScripts(): void
{
$editor_name = RL_Input::getString('editor', 'text');
// Remove any dangerous character to prevent cross site scripting
$editor_name = RL_RegEx::replace('[\'\";\s]', '', $editor_name);
RL_Document::script('sourcerer.popup');
$script = "document.addEventListener('DOMContentLoaded', function(){RegularLabs.SourcererPopup.init('" . $editor_name . "')});";
RL_Document::scriptDeclaration($script, 'Sourcerer Button', true, 'after');
}
}