Page 1 of 1

CG Feedback apostrophe error

Posted: Thu Apr 28, 2011 4:01 pm
by bDoc
I'm using the latest version of CMSMS (1.9.4.1) and CGFeedback (1.3.3) and every time someone enters a comment with an apostrophe it doesn't handle it and displays it as &#39. Has anyone had this problem befored an know how to fix this?

Post a test comment with an apostrophe in the comment box.
Test it here.
http://fransmart.com/index.php/news/2/8 ... ussed.html


Thanks

Re: CG Feedback apostrophe error

Posted: Sun Jun 12, 2011 10:32 pm
by Genyus
I ran into this same bug and after a great deal of prodding and poking, was able to properly resolve ALL comment formatting issues as follows:

In the summary form, replace

Code: Select all

{$one.data|htmlspecialchars}
with

Code: Select all

{$one.data|html_entity_decode:$smarty.const.ENT_QUOTES|nl2br}
The nl2br was required to fix the issue I found of line-breaks not being displayed.

In the comment form template, replace

Code: Select all

{input_comment}
with

Code: Select all

{$input_comment|html_entity_decode:$smarty.const.ENT_QUOTES}
This latter change is necessary because if the comment submission fails (due to invalid fields, failed CAPTCHA, etc), the comment will be encoded in the textbox and then re-encoded again during any subsequent submission, which means you can't correctly decode it in the summary template.

Hope this helps anyone else who has or may yet encounter this problem...

Re: CG Feedback apostrophe error

Posted: Tue Sep 13, 2011 10:10 am
by airelibre
Thanks for the tip, it works - is there a bug report for this problem ?

Re: CG Feedback apostrophe error

Posted: Tue Sep 13, 2011 11:32 pm
by paulbaker
airelibre wrote:...is there a bug report for this problem ?
Not that I can see. You can report it here, then the author will be aware of it:
http://dev.cmsmadesimple.org/bug/list/616