Hello -

I'm trying to use Inline in a context where the title of the file might need to contain HTML entities. Is it possible to convert these for display?

Example:
[file:dudesfile.pdf=The Dude’s File (PDF)]

I know the obvious answer is to just limit yourself to the basic character set for you link titles, but I'm trying to use the Typogrify filter as well, and I'm currently being forced to choose between the two for this reason...

Thanks!

Comments

squarecandy’s picture

[file:dudesfile.pdf=The Dude’s File (PDF)]
squarecandy’s picture

Found the fix for this in 6.x-1.0:
inline.theme.inc, Line 16
change from:
return l($linktext, file_create_url($file->filepath), array('attributes' => array('title' => t('Download: @name (@size)', array('@name' => $file->filename, '@size' => format_size($file->filesize))))));
to:
return l($linktext, file_create_url($file->filepath), array('attributes' => array('title' => t('Download: @name (@size)', array('@name' => $file->filename, '@size' => format_size($file->filesize)))), 'html' => TRUE));

I'm a little confused about the dev versions and where I should submit this. I'm also a bit of a noob when it comes to the whole submiting patches thing...

Hope this is helpful and can make it into future versions. It's really helpful to be able to put HTML (including entities) in the link text.

kenorb’s picture

The same problem.

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 5 and Drupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.