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.

#106339 html code is stripped from the editor

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 Ryan on Saturday, 16 January 2021 12:56 GMT

Thomsterdam
Hi, Before I start: In the question below I have changed HTML code from ampersand#123semicolon to & #123 ;, because your forum editor changes it to { which makes it impossible to ask my question. I am writing a mini-manual for a RegularLabs plugin, called ‘Sliders’, which generates accordion elements. I'm sure you are familiar with how it works. You insert

{slider title of the slider}
into the article, then you write the text that should be shown when you click on the element, (you can repeat the above a few times) and then you end with the code

{/sliders}
Now to write the manual, I am inserting & #123 ; for the opening curly bracket and & #125 ; for the closing bracket, because I want to show my fellow editors where to use which code and I want to avoid the plugin converting the code into a real life slider. What I did was: I turned off HTML validation in my profile, but JCE converts &_#123_; to a curly bracket { as soon as I save the article. Is there a way to prevent JCE from doing that, so that I will have {slider title of the slider} which will be converted into a slider by the RegularLabs plugin, and then in the tutorial

& #123 ;slider title of the slider& #125 ;
which will only show the text to insert in the manual article. Thanx, Thom

Attachments

Ryan
What I did was: I turned off HTML validation in my profile, but JCE converts &_#123_; to a curly bracket { as soon as I save the article.


Does this only happen when you save, or when you toggle the editor, or click the Code tab then back to the Editor tab?

Ryan Demmer

Lead Developer / CEO / CTO

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

Thomsterdam
Hi Ryan,

yes, that is right. I was going to say toggle, but then I decided to write save instead. But indeed: when you toggle from code to JCE and back, the & #123 ; disappears.

Any solution?

Thom

Ryan
In the Editor Global Configuration, is Entity Encoding set to UTF-8?

Ryan Demmer

Lead Developer / CEO / CTO

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

Thomsterdam
Yes indeed!

Ryan
I'm not seeing this issue in my tests. Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

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

Thomsterdam
Sorry, we are a regional government security authority, I can't give you access to any of our sensitive sites. perhaps I will have to insert an image instead. Not worth risking losing my job over. I'm sorry

Thomsterdam
Hi there,
I think I have found it:
In the general options I still had the option validate HTML turned on.
I'll check tomorrow at work.

Thanx for your patience and advice.

Thom

Ryan
In the general options I still had the option validate HTML turned on.


This shouldn't make a difference, as I have it enabled too.

In Editor Profiles -> Editor Parameters -> Advanced, is Protect Shortcode set to No? If not, then set it to No.

Ryan Demmer

Lead Developer / CEO / CTO

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

Thomsterdam
Good morning,
Let me tell you in detail what settings I have configured:
- In Global Configuration, I have set "Validate HTML" to No.
- In Profile Super User > Editor Parameters, I have set "Validate HTML" to No.
- I have assigned the Profile Super User to the Super Users
- I have logged in as a Super User.

Can you tell me if I have missed something? JCE still converts the code to a symbol.

Thanx


Thom

Ryan
- In Global Configuration, I have set "Validate HTML" to No.
- In Profile Super User > Editor Parameters, I have set "Validate HTML" to No.


These settings would not affect entities conversion.

What about the Protect Shortcode option in my previous post? Is that set to No?

Ryan Demmer

Lead Developer / CEO / CTO

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

Thomsterdam
Hi there,
Sorry, I missed your suggestion. It was and is set to No.

What I have done now, is make a tiny image (screenshot) of the { and the } and put them inline. It is not really a true solution, but I can't think of anything else at the mo.

Cheers,

Thom

Ryan
If I could reproduce this, I'm sure I could fix it.

Please send me your profile. Perhaps a setting in there is causing the issue. Export the profile - https://www.joomlacontenteditor.net/support/documentation/profiles/profiles-export - then zip it and post it here as a zip file.

Ryan Demmer

Lead Developer / CEO / CTO

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

Thomsterdam
Hello,
Thanks for looking into this.

I'm uploading it here.

Thom

Attachments

jce_editor_profile_2021_01_15.xml.zip

Ryan
Still not able to reproduce it with your profile, see below (using example content from RegularLabs Slider documentation) :

https://cdn.joomlacontenteditor.net/tmp/106339-html-code-is-stripped-from-the-editor.gif

Also, when using the encoded version of the brackets, they are not rendered as {} in the front-end article, so I don't think this approach would work anyway.

Perhaps there is a way to disable the Sliders plugin from processing content for a particular article?

Ryan Demmer

Lead Developer / CEO / CTO

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