Login Form

#541 – dollar sign values in description text causes dropped characters in emails

Posted in ‘BF Auction’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 26 February 2015 00:37 AEDT
Joomla! version: 2.5
BF Auction Plus: 1.7.5

Yep, me again :-) Having problems with a special character ("$") in the email messages.

All our auction items include a line in the description indicating the item's estimated value, like this:

Estimated Value: $3000

It displays fine on the website, but when the description is included in an email message, the dollar sign and two following characters are dropped, so it displays like this:

Estimated Value: 00

I figured this must be something with the encoding (the controller taking the dollar sign as indicating a variable?), so I tried using the HTML ASCII code instead ($), but Joomla converts it into a dollar sign, and the dollar sign is stored as a simple character in the database, not as the HTML entity.

A workaround I guess would be to format our estimated values as "USD3000" or similar, but if there's a quick way to fix this, I wouldn't have to manually update every auction item description.
Thursday, 26 February 2015 14:39 AEDT 120'
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
I was able to reproduce this issue on my test site. To fix you should be able to edit /components/com_bfauction_plus/controller.php

//line 1014
$myemail[0]->description=preg_replace('/{description}/', $myitem[0]->description , $myemail[0]->description); // insert item description

//change to
$myemail[0]->description=preg_replace('/{description}/', addcslashes($myitem[0]->description,'$') , $myemail[0]->description); // insert item description

Let me know how you go, if it works for you too I'll include in the next version release.


Follow us on twitter http://twitter.com/tamlynsoftware
Thursday, 26 February 2015 23:17 AEDT
Works great Tim, thanks!
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.
Go to top