[Typo3-shop] XHTML Compliance

Franz Holzinger franz at fholzinger.com
Mon Jan 30 01:43:34 CET 2006


Hello Nick,

> I've found a small bug in lib/class.tx_ttproducts_list_view.php with
> reference to XHTML compliance in line 327:
> 
> $markerArray['###PRODUCT_NOTE###'] =
> substr($markerArray['###PRODUCT_NOTE###'], 0,
> $this->conf['max_note_length']) . '...';
> 
> is missing a closing p tag.
> 
> The entire ###PRODUCT_NOTE### marker contains something like this
> 
> <p class="bodytext">blabla ...</p>

This might be the case with your shop implementation but not a general one.

> 
> So if the product note is being cut because it is longer than
> max_note_length, the closing p tag gets cut as well.
> 
> To correct this, simply substitute line 327 with this:
> 
> $markerArray['###PRODUCT_NOTE###'] =
> substr($markerArray['###PRODUCT_NOTE###'], 0,
> $this->conf['max_note_length']) . '...</p>';
> 

This does not help others who have several HTML tags in the description
field. A more intelligent function would be needed which conserves all
possible tags and closes them correctly.




Franz



More information about the TYPO3-project-tt-products mailing list