Escaped quotes shown in emails

318
Defect
John Hobson
-
3.0.7
-
-
Invalid
Normal
Normal
8 years ago
7 years ago
0

Description

I added a new ticket to a project to which I was subscribed.

I received an email titled 'New ticket #1 (Ticket Name) on project Project 1'

Within the body of the email quotation marks were shown as escaped:

A new logo is required that places more emphasis on the \'Dog\' and less on the \'Cat\'

It should be more dynamic.

The quotation marks should not be escaped

Ticket History

8 years and 9 months ago by Ian Littman

I couldn't reproduce the problem. With the exact same text, I get no leading slashes. My guess is that it's a server config issue; I'm running stock PHP 5.4.12.

8 years and 9 months ago by Jack

I also cannot reproduce the issue. What version of PHP are you using?

8 years and 9 months ago by John Hobson

I'm on 5.3.21

I've put a phpinfo() page up here if it's of help: http://support.damselflydevelopment.com/phpinfo.php

The escaped quotes are also showing in the interface, see http://hob.so/NEVg

This is what the email looks like: http://hob.so/NFWc

8 years and 9 months ago by Jack

  • Closed ticket as Invalid

You appear to have magic_quotes_gpc turn on, this causes PHP to addslashesuser inputted data.

Check out the PHP.net page for disabling magic quotes.

8 years and 9 months ago by John Hobson

I was having trouble in disabling magic_quotes_gpc on my shared hosting. I don't have access to php.ini and putting it in .htaccess gave a 500 error.

However I found another solution via php.net, see example 2 at http://us.php.net/manual/en/security.magicquotes.disabling.php

I put that code in index.php and now it's working fine. I'm sure there's a better place to put it within the avalon framework, but that will do as a quick and dirty for now.

Perhaps this fix can be implemented in a future version to make it less reliant on hosting config?