W3C Validation when printing ampersands (&)

parrottvision - July 23, 2009 - 09:54
Project:Taxonomy Image
Version:6.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I am trying to figure out if it is me or Taxonomy Image that is messing up my validation.

I am printing taxonomy image in the node.tpl.php like this:

<?php
print $node->content['taxonomy_image']['#value'];
?>

But it is outputting this:

As you can see the title tag is printing "Food &amp; Drink" with a faulty & ?? Yet the alt tag is OK and everywhere else on the site is fine.

Any ideas on this one?

#1

parrottvision - July 23, 2009 - 09:56

Sorry - I mean it is outputting this - see title tag:

<div class="taxonomy-images"><a href="link" class="taxonomy-image-links"><img src="imagegoeshere" alt="Food &amp; Drink" title="Food &amp;amp; Drink" height="15" width="15">

 
 

Drupal is a registered trademark of Dries Buytaert.