Closed (fixed)
Project:
Link
Version:
5.x-2.1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Jan 2008 at 16:43 UTC
Updated:
3 Mar 2012 at 15:52 UTC
I am using Image field and Link.
In the placeholders for Link Title, there is the Image Field token titled “Fully formatted HTML image tag”.
However, this always produces HTML text as opposed to an image with a clickable link.
Is there anyway to rectify this?
I have tried allowing
tags in the input formats, but it doesn’t seem to help.
If there is no solution to this, then is there any other module that allows users to upload an image and have it link to a site they specify?
Thanks for any help.
Comments
Comment #1
quicksketchHow interesting! I never would have put the two features together in such a clever way! The HTML string as the link title is probably due to a check_plain() call on the title. Replacing this with filter_xss_admin would allow all HTML tags except for
<script>, <object>, and a few others. I'll look into allowing HTML in titles when they're provided by administrators.Comment #2
big_smile commentedThe HTML string as the link title is probably due to a check_plain() call on the title. Replacing this with filter_xss_admin would allow all HTML tags except for <script>, <object>, and a few others..Where do I make this change? I just can't seem to figure it out (I'm not very technical!).
Any help you could give would be greatly appreciated.
Comment #3
bflora commentedI'd also like to be able to do this. I can't see a check_plain anywhere in the module code for the title info. Maybe I'm not looking for the right thing? Please advise on how to patch the module to let me do stuff like include and tags in my titles.
Comment #4
quicksketchThere aren't any explicit calls to check_plain() in link module, but the l() function automatically runs check_plain() on all titles that are run through it. You can override this behavior by passing in the $html = TRUE flag. I've just updated the module to allow a subset of inline elements (including span, img, strong, em, and a few others) inside the link when using a static value or tokens.
D5 changes: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/link/link.mod...
D6 changes: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/link/link.mod...
I'm rolling out the 2.2 version shortly.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
kevinorin commentedI also need this function:
Mock: http://bit.ly/n6ECPw
Site: http://bit.ly/qDba3U
Brief: the mock has the title with 2 font styles. The first part in blue text and the fund/ticker in a light gray smaller font.
How would I go about accomplishing 2 styles for the title in Drupal. Is there a easy way to allow some sort of short code...
IE. [b]bold text shortcode[/b]
Comment #7
dqddue to the mass of repeating feature requests regarding the additional title field, the title field teeters on the brink. Since even I - as one of the maintainers of the module - don't use the title field, I would like to provide some info here about how Drupal works and how you can reach your goal, even if this issue is for a link field version which is not supported no more, and even if the issue is closed:
And e viola, here is your link field with a title which supports all the features, which are combinable with text fields like, tokens, html markup, translation and many more. You can even have 20 titles if you want.
Comment #8
dqdtagging