Forums

Email Templates Now Adds Backward Slashes

chinny 03 Apr, 2015
Hello Admin,

Recently, my once well functional form on my website suddenly developed a bug when i know so well i never made any single changes at all. When i open the form and make some changes and save the form, the Email Templates of Email Action for Email To Admin, Email To Client and Display Message now adds backward slashes before anywhere Single Quote (') or Double Quote (") is seen both on the Email Template Codes or in the Email Texts itself on each save of the form. A sample code snippet of the bug is as seen in the code segment below:

<p style=\\\\\\\\\\\\\\\"text-align: justify;\\\\\\\\\\\\\\\"><span style=\\\\\\\\\\\\\\\"font-family: book antiqua,palatino; font-size: medium;\\\\\\\\\\\\\\\"><img src=\\\\\\\\\\\\\\\"http://mysite.com/images/itemspics/header.jpg\\\\\\\\\\\\\\\" alt=\\\\\\\\\\\\\\\"DOLPA Letter Head\\\\\\\\\\\\\\\" width=\\\\\\\\\\\\\\\"730\\\\\\\\\\\\\\\" height=\\\\\\\\\\\\\\\"150\\\\\\\\\\\\\\\" /></span></p>
<p style=\\\\\\\\\\\\\\\"text-align: justify;\\\\\\\\\\\\\\\"><span style=\\\\\\\\\\\\\\\"font-family: book antiqua,palatino; font-size: medium;\\\\\\\\\\\\\\\">Ref:<span style=\\\\\\\\\\\\\\\"text-decoration: underline;\\\\\\\\\\\\\\\">   FOLPC15/{statecode}/{surname}{nativename}/{aftnumber}   </span>                                     Date:<span style=\\\\\\\\\\\\\\\"text-decoration: underline;\\\\\\\\\\\\\\\">   {date}   </span> <br /></span></p>
<p style=\\\\\\\\\\\\\\\"text-align: justify;\\\\\\\\\\\\\\\"> </p>
<p style=\\\\\\\\\\\\\\\"text-align: center;\\\\\\\\\\\\\\\"><strong><span style=\\\\\\\\\\\\\\\"font-family: book antiqua,palatino; font-size: medium;\\\\\\\\\\\\\\\"><span style=\\\\\\\\\\\\\\\"font-size: x-large; color: #0000ff;\\\\\\\\\\\\\\\">FOLPC15 ACKNOWLEDGEMENT LETTER</span></span></strong></p>
<hr />
<p style=\\\\\\\\\\\\\\\"text-align: right;\\\\\\\\\\\\\\\"><img class=\\\\\\\\\\\\\\\"caption\\\\\\\\\\\\\\\" title=\\\\\\\\\\\\\\\"{nativename}\\\\\\\\\\\\\\\'s Contest Picture\\\\\\\\\\\\\\\" src=\\\\\\\\\\\\\\\"http://mysite.com/components/com_chronoforms5/chronoforms/uploads/DOLPA_FOLPC2015_Form/{folpcpix}\\\\\\\\\\\\\\\" alt=\\\\\\\\\\\\\\\"{nativename}\\\\\\\\\\\\\\\'s Contest Picture\\\\\\\\\\\\\\\" width=\\\\\\\\\\\\\\\"150\\\\\\\\\\\\\\\" height=\\\\\\\\\\\\\\\"180\\\\\\\\\\\\\\\" /> </p>
<p style=\\\\\\\\\\\\\\\"text-align: justify;\\\\\\\\\\\\\\\"><span style=\\\\\\\\\\\\\\\"font-family: book antiqua,palatino; font-size: medium;\\\\\\\\\\\\\\\">Dear <span style=\\\\\\\\\\\\\\\"font-family: book antiqua,palatino; font-size: medium;\\\\\\\\\\\\\\\">{surname}</span> {nativename},</span></p>


The more i save the form, the more the slashes are added. I have updated the Chronoform V5 to the latest version and it still keeps on happening. Am confused on what to do right now.

Am wondering if there is no way the text editor on the email template can be made to connect and choose my already installed JCE text editor. The default editor the component comes with lacks so many features for advanced formatting of the email template.

About the problem above, please help me out fast for my client is seriously on my neck for the form to start sending out messages normal as it used to do before.

Thanks and keep up the good work.

Chinny
GreyHead 03 Apr, 2015
Hi Chinny,

It looks as though your PHP.ini file has Magic Quotes set on. Please turn them off again.

You can check the current setting in the Site Admin | System Info | PHP Info page.

Bob
chinny 03 Apr, 2015
Thanks GreyHead for your fast response. Please can you help tell me how to set this on my live server?

Thanks once again.
GreyHead 03 Apr, 2015
Hi Chinny,

It's a PHP.ini file setting, the page I pointed you to should show you which .ini files are in use. You'll need to check with your web-host's documentation about how to edit them.

Bob
chinny 03 Apr, 2015
Alright Bob Friend.

Let me check on it now.

Thanks.
chinny 03 Apr, 2015
1 Likes
Wow! I just saw it. The Magic Quotes is on. But i have fixed it up. The solution was as follows:


How to turn off magic quotes gpc for Joomla
Solution For Shared Hosts

create a php.ini file at your Joomla! root.
Add this content to the file and save

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off


Edit your .htaccess file and add this line at the top and save the file

SetEnv PHPRC /home/youruser/public_html/php.ini


Where "youruser" is your username for your hosting account.



Thanks a lot Bob

Chinny
This topic is locked and no more replies can be posted.