Post by alph17 » Mon Nov 20, 2017 3:17 pm

Hi
I have a problem with review on product, when i enter a comment like:
My
Comment

Are
Here
my comment show that:
My Comment Are Here
if i use <br> or \n that don't work too :/
Opencart version 1.5.5.1

I really want my comment like that when his shown :
My
Comment

Are
Here
can you help me please ?

Newbie

Posts

Joined
Mon Nov 20, 2017 1:29 am

Post by IP_CAM » Tue Nov 21, 2017 4:11 am

In the admin\model\catalog\review.php file, in this Section:

Code: Select all

class ModelCatalogReview extends Model {
public function addReview($data) { 
I found this:

Code: Select all

 $this->db->escape(strip_tags($data['text']))
wich could be changed to this:

Code: Select all

 $this->db->escape($data['text'])
but then allowing any Code to be added to Reviews, even Badcode.
It's the only Filter I found, related to Reviews in OC v.1.5.5.1
Ernie

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.ebikes.li - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by alph17 » Tue Nov 21, 2017 4:43 am

Thanks for your help,
I have try, but nothing change,
I have try to put <br> directly in comment too, but when review has show that show "MyComment<br>areHere"

ps: i use default theme

Newbie

Posts

Joined
Mon Nov 20, 2017 1:29 am
Who is online

Users browsing this forum: No registered users and 105 guests