Hi Ryan and team,
I'm experiencing a frustrating issue with handling of <figure> elements around images in JCE Pro starting from version 2.9.90. It worked perfectly in 2.9.89, but after the two consecutive updates (2.9.90 and 2.9.91), the HTML code gets dismantled on save or view switch. I've tried all standard workarounds (disabling validation/sanitization, etc.), but it persists even in 2.9.93.
Steps to reproduce (in a new article):
1. Open an article in edit mode.
2. Go to the Code tab and insert this exact code:
<div class="ve-seccioflex-row">
<figure class="ve-seccioflex-media"><img src="https://www.joomlacontenteditor.net/images/sample/sample-image.jpg" alt="Sample image description" width="630" height="354" /><figcaption> </figcaption></figure>
</div>
(Or without figcaption, but I've tried both versions.)
3. Switch to the Editor tab (or save and re-edit).
4. Go back to the Code tab: The result is this (the <img> moves outside the <figure>, and it ends up empty):
<div class="ve-seccioflex-row"><img src="https://www.joomlacontenteditor.net/images/sample/sample-image.jpg" alt="Sample image description" width="630" height="354" />
<figure class="ve-seccioflex-media"><figcaption> </figcaption></figure>
</div>
My setup:
• Joomla: 5.x (with Helix Ultimate 2 template – the ve-seccioflex-* classes are from my custom theme).
• JCE Pro: 2.9.93 (I've updated step by step: 2.9.90 → 2.9.91 → 2.9.92 → 2.9.93; issue started from 2.9.90).
• Editor Profile: Default.
o Editor Parameters > Cleanup & Output: Validate HTML = No; Sanitize HTML = No.
o Typography: Container & Enter = No Container & Linebreak on Enter.
o Toggle Editor button: Disabled.
• Global Configuration (JCE): Custom Variable figure_data_attribute = false (to avoid automatic attributes on <figure>).
• Joomla Global > Text Filters: No Filtering for Super Users.
Workarounds tried (without success):
• Fully disabling Sanitize/Validate.
• Adding custom attributes like data-custom="preserve" to <figure>.
• Using empty <figcaption> or with (still dismantles).
• Editing only in Code tab and saving without switching tabs.
• Clearing JCE/Joomla cache after each update.
Thanks in advance
Best regards
Lluis
