Closed (fixed)
Project:
Smileys
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 Jun 2007 at 02:45 UTC
Updated:
7 Feb 2008 at 18:12 UTC
When the filter inserts images the class="smiley-class" attribute is omitted. This is a problem for us as all other images inside content have been themed to have border, padding, etc. It also means one is unable to style the images without affecting others inside content.
Very simple to fix inside the smileys_filter_process function.
140c140
< $text = eregi_replace("([ ,\.\?!:\(\)\r\n\<\>])". preg_quote($a) ."([ ,\.\?!:\(\)\r\n\<\>])", "\\1<img src=\"". check_url(base_path() . $smiley->image) ."\" title=\"". check_plain($alt) ."\" alt=\"". check_plain($alt) ."\" />\\2", $text);
---
> $text = eregi_replace("([ ,\.\?!:\(\)\r\n\<\>])". preg_quote($a) ."([ ,\.\?!:\(\)\r\n\<\>])", "\\1<img src=\"". check_url(base_path() . $smiley->image) ."\" title=\"". check_plain($alt) ."\" alt=\"". check_plain($alt) ."\" class=\"smiley-class\" />\\2", $text);
142c142
< $text = eregi_replace(preg_quote($a), '<img src="'. check_url(base_path() . $smiley->image) .'" title="'. check_plain($alt) .'" alt="'. check_plain($alt) .'" />', $text);
---
> $text = eregi_replace(preg_quote($a), '<img src="'. check_url(base_path() . $smiley->image) .'" title="'. check_plain($alt) .'" alt="'. check_plain($alt) .'" class=\"smiley-class\" />', $text);
Comments
Comment #1
Gurpartap Singh commentedhttp://drupal.org/cvs?commit=97297
Fixed! Thanks!
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.