JCE stripping javascript from module but not article
Hi, first off I’m using Joomla 4.1.3
I have JCE installed and it is my editor for both articles and modules.
I have created a very simple module that uses form fields to manage and display an accordion (faq)
When I add a simple javascript to an article it works fine
When add the same javascript to a custom html module it works fine
but when I add the same javascript to my faq module and save it, the code is stripped out.
Can anyone point me to where I may be going wrong, either with my code or the JCE settings.
Thanks
EDIT: I've worked it out and it was my fault:
In the XML for my faq module l had the wrong filter set:
OLD: <field name="answer" type="editor" filter="safehtml" height="100px" label="answer" />
NEW: <field name="answer" type="editor" filter=“raw” height="100px" label="answer" />
Hi, first off I’m using Joomla 4.1.3
I have JCE installed and it is my editor for both articles and modules.
I have created a very simple module that uses form fields to manage and display an accordion (faq)
When I add a simple javascript to an article it works fine
When add the same javascript to a custom html module it works fine
but when I add the same javascript to my faq module and save it, the code is stripped out.
Can anyone point me to where I may be going wrong, either with my code or the JCE settings.
Thanks
EDIT: I've worked it out and it was my fault:
In the XML for my faq module l had the wrong filter set:
OLD: <field name="answer" type="editor" filter="safehtml" height="100px" label="answer" />
NEW: <field name="answer" type="editor" filter=“raw” height="100px" label="answer" />