Search
Other Sourcerer questions
Forum

[[ are not replaced by <

Christophe Lebis's Avatar Christophe Lebis
Hello, I have an issue since the Sourcerer Pro update. [[ and ]] are no longer replaced by < and >.
Joomla 5.2.3, Sourcerer Pro v12.0.0, JCE Pro 2.9.82
I tried different settings but couldn't solve the problem. It was working normally until now.

For exemple in a module :
{source}<?php
$adhesion='[[span id="adherent"]]Vous êtes adhérent [[/span]]';
echo $adhesion;
?>{/source}
output: [[span id="adherent"]]Vous êtes adhérent [[/span]]
Best regards
Peter van Westen's Avatar Peter van Westen ADMIN
Correct, this is removed in the last to major versions due to the security issues it brings along.
See the changelog.

PS: Always read the changelogs before updating, especially with major version upgrades, as they contain breaking changes.
Please post a rating at the Joomla! Extensions Directory
Christophe Lebis's Avatar Christophe Lebis
Ok, thanks, but...
How to do now to generate html code with PHP ?

Edit : I find! Just add {source raw="true"}.
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure why you are using Sourcerer for that example anyway.
Why not just place that html in the editor (html view)?
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
If you want to output html through php, simply do this in the WYSIWYG view:
{source}<?php
$adhesion='<span id="adherent">Vous êtes adhérent</span>';
echo $adhesion;
?>{/source}
If your editor is not allowing you to place <html> style tags in the content, adjust the settings in the editor.

If you are NOT using a WYSIWYG editor, then yes, use the {source raw="true"} tag.
Please post a rating at the Joomla! Extensions Directory
Christophe Lebis's Avatar Christophe Lebis
Hello,
Of course, the given example is not reality. In the PHP code, there are tests that produce different displays based on a session variable concerning the user 😉.
I use JCE, and therefore WYSIWYG, but it works with raw="true" and doesn't work without it.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription