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:
print $node->content['taxonomy_image']['#value'];

But it is outputting this:

Comments

parrottvision’s picture

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">
bluetegu’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new539 bytes

Hi,

I got the same in 5-x-1.6. I commented one line and now it works fine. See attached patch.

Hope this helps.

sadist’s picture

Thanks, I used that against 6.x and it works.

nancydru’s picture

Status: Patch (to be ported) » Needs work

Put a double quote into the text and see how it breaks with that commented out. Or even worse, use <script><alert>Security violation!</alert></script>.

BrandTim’s picture

Status: Needs work » Needs review
StatusFileSize
new659 bytes

Patch attached which fixes the ampersand encoding problem while preserving the quotes encoding and security encoding for < and >.

Patch is against 6.x-1.6.

Tim Knittel

saranyamohan’s picture

--- ./taxonomy_image.module_OLD 2011-03-19 14:54:11.000000000 -0400
+++ ./taxonomy_image.module 2011-03-19 14:56:18.000000000 -0400

now change the 67 line
// Have to dump double quotes for attribute.
$current->title=strip_tags($current->title);

anniegreens’s picture

StatusFileSize
new711 bytes

Updated patch from #5 using Drupal patch standards.