Line Breaks in User Reviews

I have some user reviews that I’m importing from another cart, and I notice that the user review field does not acknowledge line breaks. So, reviews that are several paragraphs are just one huge paragraph. I’ve even tried adding HTML

tags to the paragraphs, but it seems to just ignore and delete these. Is there any way to show line breaks in user reviews properly so when a user hits enter to start a new paragraph, it will be formatted as such?

Hi,

I have similar requirements, after doing a little tracing, I’ve modified the file below to make the review to be able to accept html tags, hope this helps.



========== Modification ==================

in

addons\discussion\include\common\discussion.php



under this line:

if ($REQUEST_METHOD == ‘POST’) {



Add this line:

fn_trusted_vars(“_data”, “post_data”, “posts”);



==============================================

Similar MOD for Order Status (this is where I got the idea):

[url]http://forum.cs-cart.com/showthread.php?t=1689[/url]

I don’t like the idea of customers being able to enter HTML. I’d rather wiork out a way to convert linebreaks to
tags.

I have a support request into CS-Cart about this issue. They’ve acknowledged a small bug and are working on a fix. I’ll let you know when I hear back from them.

Hi,



Did you get a reply back on the fix?

Ah yes, sorry! It’s a very simple fix.



In order to fix this bug please modify the “discussion.tpl” file located in the “skins/[CUSTOMER_SKIN]/customer/addons/discussion” directory and replace the following line of code there:



```php {$post.message}
```





with this one:



```php {$post.message|nl2br}
```





Save the file.