Post by Noit » Sat Jun 30, 2018 3:06 am

The short product description, as shown in the product categorie and for example in the new products list, is all in one line, no returns. See www.noit.nl, what is wrong?

Newbie

Posts

Joined
Sat Jun 30, 2018 3:04 am

Post by IP_CAM » Sat Jun 30, 2018 9:13 am

Well, such is usually done in the controller/category.php File,
by use of the strip_tags Filter element:

Code: Select all

'description' => (strlen(utf8_decode(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))))> 80 ? mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, mb_strrpos(mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 55, 'UTF-8'), ' ', 0, 'UTF-8'), 'UTF-8') : strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))) . ' ..',
If you remove that (strip_tags( .......... )) command, the html tag <br> should work, I assume.
Check Google, if you want to find out more about such ways of filtering HTML Tags. ;)
And if you allow someone else, to create Products, one could add hidden script code, doing
bad things to your Site ! ::)
UNTESTED, as it comes!
Ernie
PS: But it's purpose is also, to avoid, creating height oversized Grid-View Windows, by putting
the description content part into one single line.

For Sale: Turnkey URLs with Opencart installed
Present Opencart LIGHT Testsite: http://www.velomech.ch
Attacker IP Blocks are denied from further access to my Sites!
Just contact me for more Information at: jti@jacob.ch
730+ FREE OC Extension-Repositories - from OC v.1.5.x up
on the largest Opencart-Mod Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

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

Users browsing this forum: jamaakurtlar, paulfeakins and 19 guests