By rytech123 on Friday, 24 March 2017
Replies 8
Likes 0
Views 1.4K
Votes 0
I am trying to enter equations into my joomla website, but the '/' keeps getting stripped.

I have set the 'unfilter' to ON.

But when I put in the equation of:
{tex} \frac{-b\pm\sqrt{b^2-4ac}}{2a} {/tex}

the \ get stripped.

Note: It works fine in my joomla articles.

Only authorized users can enter these equations in the system.

Please help!
Hello Laura,

As a core hack you can edit:

/components/com_jevents/libraries/iCalEventDetail.php

look for:

			$this->description = stripslashes($this->description);


Change it to:

			$this->description = $this->description;


I suspect this is a filtering method we added prior to J2.x/3.x. I will get confirmation from geraint as he will know why he added it :-)

Many thanks
Tony
·
Monday, 27 March 2017 21:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

This looks more like a JCE issue. Likely they are cleaning up the code.

Turn your editor off in your profile and try saving again.

Many thanks
Tony
·
Friday, 24 March 2017 21:14
·
0 Likes
·
0 Votes
·
0 Comments
·
I removed the editor from my user account. I tried again to put in the following formula


{tex} \frac{-b\pm\sqrt{b^2-4ac}}{2a} {/tex} {tex} \frac{3}{4} {/tex} {jmimetex} \frac{3}{4} {/jmimetex}



On the save JEVENTS removed the \ before the frac

Another note, in ARTICLES, that use JCE the code is NOT STRIPPED, only in jevents.

thanks again for your help.

thanks,
Laura
·
Monday, 27 March 2017 13:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Is this in the Event Details or in the JEvents Custom Layout?

Many thanks
Tony
·
Monday, 27 March 2017 15:42
·
0 Likes
·
0 Votes
·
0 Comments
·
It happens in the EDITING of EVENT DETAILS.

And it works fine on Article Editing in JCE.

thanks,
Laura
·
Monday, 27 March 2017 15:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Note, we are using the plugin:
https://extensions.joomla.org/extensions/extension/living/education-a-culture/jmimetex/

What is getting stripped are the '/' that we need to put into the code for this to work.

{tex} \frac{-b\pm\sqrt{b^2-4ac}}{2a} {/tex} {tex} \frac{3}{4} {/tex} {jmimetex} \frac{3}{4} {/jmimetex}



When I use this plugin without the \frac, it works fine, so the plugin is getting called properly. The only problem is the removing of the '\'

thanks,
Laura
·
Monday, 27 March 2017 16:40
·
0 Likes
·
0 Votes
·
0 Comments
·
The reason it was included was because the iCal specification (https://tools.ietf.org/html/rfc5545#page-45) says that several characters in text fields are escaped using a backslash.

You should keep a record of this code change for future releases OR you could always escaped your back slashes. i.e. use

{tex} \\frac{-b\pm\sqrt{b^2-4ac}}{2a} {/tex} {tex} \\frac{3}{4} {/tex} {jmimetex} \\frac{3}{4} {/jmimetex}

in your descriptions. I know its a pain to do but it should work ok,
·
Tuesday, 28 March 2017 08:57
·
0 Likes
·
0 Votes
·
0 Comments
·
So in order for our system to work, we had to put in the code 'adjustment' that you suggested. The 'escape back slashes didn't always work properly.

It would be great if you had a '3rd editing option' to allow for the back slashes to be added into the description. If that is ever the case, please let me know!

In the meantime, we will keep track of our code 'hack' so when we upgrade jevents we won't lose our change.

thanks,
LAura
·
Tuesday, 18 April 2017 16:46
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post