Closed (fixed)
Project:
Upload Image
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2007 at 17:38 UTC
Updated:
30 May 2009 at 23:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
Wounded Knee commentedThis image was uploaded with the post title bla bla bla.
parent post: < em >title bla bla bla< /em >
It's possible hide < em > tags?
Comment #2
santiajo commentedIn upload_image_link change:
to:
Comment #3
ansorg commentedno, this does not work - at least not with the Drupal-6 version.
reason is that the <em> does not get added by the check_plain() function but by the t() function when the variable is specified with %
I do not know whether it is possible to get a proper <em> into this but a working fix to get rid of the "fake" <em> is
the @-prefix ensures that text is escaped, therefore the check_plain is not needed. See http://api.drupal.org/api/function/t
I attach a patch that does change this line in upload_image.module. This is tested with D6 but from reading the t() documentation it should also work against D5
Jens
Comment #4
CoolDreamZ commentedI can confirm that this solution works in Drupal 5
Comment #5
ansorg commentedGreat, thanks.
Hello maintainer. any chance getting this into the codebase?
Comment #6
john morahan commentedActually santiajo's change in #2 is more correct because #3 does not fix the misplaced
'html' => TRUEand so the title is still double escaped (note that right now it's triple escaped, so this is still an improvement!). So for example if the title wastom & jerryit would display astom & jerry.If you want to use the
<em>tags correctly, as opposed to removing them completely, then #2 is the correct approach. If you wanted to remove them completely, #3 is closer but you would need to either move the'html' => TRUEto the correct place as in #2, or remove it altogether and change % to !, allowing the l function to do the escaping later.In either case, the explicit check_plain definitely needs to go.
Attaching santiajo's suggestion as a patch and marking RTBC for 5.x - I haven't tested 6.x but going by the documentation for hook_link the same change should work there.
Comment #7
killes@www.drop.org commentedapplied, thanks!