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.

#110837 characters are replaced in the code

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 Thursday, 28 April 2022 10:36 BST

ellen
Hi,

without changing anything in the configuration of the jce editor some html characters are replaced in the code:

' becomes '
< becomes <
> becomes >

Most articles are OK in proper html tags, but others with some "scripting" suddenly look like that:
<area shape="rect" coords="747,5,825,64" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=970" onmouseover="return overlib('<IMG SRC=\'/images....


Can anyone help me? Never had that Problem in the past...

JCE-Editor Pro 2.9.21

Regards
Ellen

Ryan
Certain characters within an attribute value (in your case the onmouseover attribute) must be encoded, as they have a reserved status in HTML. In this case, the < and > characters denote the start and end characters of a tag, eg:

Ryan Demmer

Lead Developer / CEO / CTO

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

ellen
Why does it work before? The last time (and the years before) I worked at that code, it looked like as it should - like this:

<area shape="rect" coords="438,244,503,301" href="https://www.joomlacontenteditor.net/index.php?option=com_content&view=article&id=970" onmouseover="return overlib('<IMG SRC=\'/images/
and suddenly the characters are changed? Regards, Ellen

Ryan
The last time (and the years before) I worked at that code


Which version was this?

I dont' think JCE has ever allowed code like that within attribute values without encoding it first.

Ryan Demmer

Lead Developer / CEO / CTO

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

ellen
The last time I was working on that code was the 3rd Febuary 2022 - at that time everything was ok - like the 5 years before I`m using JCE Pro.

Ryan
Please post a link to an article containg this code.

Ryan Demmer

Lead Developer / CEO / CTO

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

ellen
Hi Ryan,

Article Link
https://www.fe-wo-insel.de/index.php/grundriss-fotos-schoeneck-1

Regards,
Ellen

Ryan
I've checked you code with various versions of JCE Pro going back to JCE Pro 2.8.18 and in every instance the <> characters are encoding in the attribute values, as they should be.

The code you are using is technically invalid, as <> symbols must always be encoded in attribute values (along with some other symbols), and JCE will always do this to create valid code.

Perhaps you added and saved your code with the editor off, or in the Code tab? Going forward, to maintain the code as it is, you will need to ensure that you edit that article with the editor off, or using the No Editor option in the Joomla Global Configuration.

Ryan Demmer

Lead Developer / CEO / CTO

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