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.

#105467 Editor keeps changing code even with html validators off

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 ericuhl on Monday, 05 October 2020 16:27 BST

ericuhl
1) While using JCE Editor it color codes the HTML but does not preserve the indents. Is there a way to preserve indents and if so how?

2) We are using RSForms by RSJoomla and coding statements in the confirmation emails similar to the following:

{if {service-pkg-4:value}-> @$4 per sqft} {service-pkg-4:value} = ${email-calc-service-pkg-4:value} {/if}


however with JCE Editor set as the default editor in Joomla it changes the -> in the statement to ->:

{if {service-pkg-4:value}-> @$4 per sqft} {service-pkg-4:value} = ${email-calc-service-pkg-4:value} {/if}

We have set the HTML validate in the user profile to NO and tried several other setting (allow PHP, etc) and it still changes the carrat. Additionally, if we change the default Joomla editor to NONE and view the code in the file, it displays the -> correctly.

How do we fix this as our emails do not function properly?

Ryan
JCE is an HTML WYSIWYG editor, and a > character in HTML represents the closing of an html tag, eg: <p>

Where that character is used in a text situation, such as in the shortcode example you give, it must be encoded, because it now constitutes the text content of another HTML tag.

It is up to the extension that is using this shortcode to recognise this, and process the shortcode accordingly.

FYI - you will get the same result when using any other WYSIWYG editor.

Ryan Demmer

Lead Developer / CEO / CTO

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

Ryan
I have managed to create a workaround for this. Please try JCE Pro 2.8.19 Beta - https://www.joomlacontenteditor.net/downloads/editor/pro/development

You will need to enable the Protect Shortcode feature on Editor Profiles -> Editor Parameters -> Advanced.

Ryan Demmer

Lead Developer / CEO / CTO

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

ericuhl
Thank you! The fix for JCE appears to be working, at least it’s leaving the -> in place. However, it does seem to be effecting the ‘appearance’ of some of the code in the JCE Editor view—it doesn’t seem to be picking up the <p> tag in some cases and using a default font instead. See attached.

Attachments

Ryan
The part you have highlighted is inline shortcode, and has been marked as such by the Protect Shortcode feature. This displays a little differently to surrounding text.

Ryan Demmer

Lead Developer / CEO / CTO

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

ericuhl
Got it, thanks!