a small bug in includes/templates/template_default/sideboxes/tpl_reviews_random.php
in code:
Sometimes when the newline happens to be in the right spot nl2br converts it to <br /> AND zen_trunc_string cuts the string in the middle of the tag.PHP Code:zen_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60)
I noticed this as an broken link in one of my customers shop:
Since the <br> is cut, the browser reads the tag as <br ..</a> and the link doesn't get closed.HTML Code:<a href="link-to-review-page">Review text here bla bla bla<br ...</a>
Solution:
Swap the nl2br and zen_trunc_string...
PHP Code:nl2br(zen_trunc_string(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text'])), 60))


Reply With Quote
