Closed (fixed)
Project:
ImageCache
Version:
6.x-2.0-rc1
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
25 May 2012 at 14:36 UTC
Updated:
3 Jun 2012 at 00:30 UTC
Hi,
My current devs integrates accessibility requirements, and it seems there was some kind of anomaly in the generated images's ALT and TITLE output. Imagecache writes a raw $alt ant $title format, transforming any HTML tags to 'non-human' plain text.
Below is what I modified to obtain user-friendly ALTs and TITLEs.
In imagecache.module at line 893 locate :
$ours = array(
'src' => imagecache_create_url($presetname, $path, FALSE, $absolute),
'alt' => $alt,
'title' => $title,
);
Then replace it with the following :
$ours = array(
'src' => imagecache_create_url($presetname, $path, FALSE, $absolute),
'alt' => trim(substr(strip_tags($alt), 0, 74)),
'title' => strip_tags($title),
);
Might not be the best solution, but it's working in my case.
Cheers,
David.
Comments
Comment #1
fizk commentedPlease reopen if this is still an issue with ImageCache 6.x-2.0-rc1.