When I click in any upload image it show:
This image was uploaded with the post title bla bla bla.
parent post: title bla bla bla
It's possible hide tags?
I try fix it in upload_image.module
'title' => t('parent post: %title', array('%title' => check_plain($image->title))),
but don't work
examples:
http://www.mtbcampogib.com/taxonomy/term/36
http://lviv.ridne.net/taxonomy_menu/2/99/55
http://www.brasilapicola.com.br/node/177
thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | upload_image-correct-em.patch | 1.09 KB | john morahan |
| #3 | upload_image.2nd.patch | 990 bytes | ansorg |
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!