You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#105793 JCE 2.9 - strange exclusion of elements

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Giuse on Wednesday, 04 November 2020 22:16 GMT

Giuse
Hi, I am trying the new code block with php executed by Sourcerer in a custom module. One of the php line is

$doc->addCustomTag('<link href="https://www.joomlacontenteditor.net/' . $url . '"/>');
and it is not working (the code is not executed). If I change it into

$doc->addCustomTag('<' . ' link href="https://www.joomlacontenteditor.net/' . $url . '"/>');
it works. So I said: it's because JCE is stripping out the link element that is prohibited, but actually: [list] [*] everything is saved to the DB, also the link; [*] also adding "link" in the extended elements of the JCE profile, it still does does not work [/list] So maybe there is a bug? thanks Giuse

Ryan
If you add this code

$doc->addCustomTag('<link href="https://www.joomlacontenteditor.net/' . $url . '"/>');
then toggle off the editor using the "power" button above the editor toolbar, is the code still intact? If it is, then this is what is being saved to the DB, and the reason it is not being executed is likely to be with Sourcerer, or some other cause.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Giuse
Ok Ryan, so JCE is not stripping link/meta/...? I see in the JCE field descriptions that such elements are being considered prohibited so stripped out...
Other question: the stripping is made on the client (that's why you say to switch it off to see what remains) and not after the submit, correct?
thanks

Giuse

Ryan
JCE is not stripping link/meta/...? I see in the JCE field descriptions that such elements are being considered prohibited so stripped out...


When it is PHP code, it is not treated as an element, so it is not processed, and therefore not removed.

Other question: the stripping is made on the client (that's why you say to switch it off to see what remains) and not after the submit, correct?


When you toggle off the editor and the code is intact, this means that JCE is not making any further changes you are seeing, and the cause is elsewhere.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Giuse
thanks