I noticed that some characters in banners title and description showed as HTML entities (i.e. & #039; for the single quote symbol).
I digged in the code and I fixed the issue in a quite rude but effective way.
Learning more about the t() funcion from Drupal bootstrap.inc I found what was the meaning of Parameters give to that function
- !variable: Inserted as is. Use this for text that has already been sanitized.
- @variable: Escaped to HTML using check_plain(). Use this for anything displayed on a page on the site.
My solution was to replace the @ parameter with the ! one in t() function calls into marinelli_banner_markups()
This function in marinelli/logics/banners.inc
Here you are the code snippets:
'alt' => t('!image_desc', array('!image_desc'=>$banner['image_description'])),
'title' => t('!image_title', array('!image_title'=>$banner['image_title'])),
...
'longdesc' => t('!image_desc', array('!image_desc'=>$banner['image_description']))
'title' => t('!image_title', array('!image_title'=>$banner['image_title'])),
...
'longdesc' => t('!image_desc', array('!image_desc'=>$banner['image_description']))
Keep on hackin' ;-)

0 commenti:
Post a Comment