CG Feedback apostrophe error

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
bDoc
Forum Members
Forum Members
Posts: 31
Joined: Sun Feb 22, 2009 2:09 am

CG Feedback apostrophe error

Post 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
Genyus
New Member
New Member
Posts: 3
Joined: Tue May 03, 2011 2:31 pm

Re: CG Feedback apostrophe error

Post 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...
User avatar
airelibre
Dev Team Member
Dev Team Member
Posts: 100
Joined: Tue Dec 01, 2009 3:42 pm

Re: CG Feedback apostrophe error

Post by airelibre »

Thanks for the tip, it works - is there a bug report for this problem ?
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: CG Feedback apostrophe error

Post 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
Post Reply

Return to “Modules/Add-Ons”