Hi,
I am trying to call a js function from BBcode. Example code below:
$config->BBCodes->addCustom(
'[nbdl payto={TEXT1} amount={NUMBER1}][/nbdl]',
'<a target="_blank" href="#" onclick="console.log({TEXT1},{NUMBER1});return false;"></a>'
);
But it then generates an error:
Attribute 'payto' is not properly sanitized to be used in this context
I understand it is a security issue to use the user input in the js code. But is there a way to sanitize the user input to make it doable?
Thanks