Sorry I keep making so many issues :) I'm correcting my own code, and I just keep finding all kinds of problems.

When a generated text image contains a slash, the output is incorrect and only shows content after the last slash. Also, HTML tags should probably be removed before showing the image. For example, a text image displaying "Are you sure you want to delete <em>My Node</em>? shows "em>?".

Both issues contribute to this problem. The attached patch encodes slashes and removes tags.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wundo’s picture

This patch didn't solved the issue here. Only the things after the last "/" appears.

danielb’s picture

Assigned: Unassigned » danielb
FileSize
774 bytes

I have also been waiting for a fix to this problem. So here it is.

Rowanw’s picture

Status: Needs review » Needs work

Neither of these patches could possibly fix the slash issue, the problem goes much deeper.

Deciphered’s picture

Status: Needs work » Fixed

Using the theme('textimage_image', 'preset', 'text', array('additional', 'text'), 'ext'); should prevent all these issues.

gutomec’s picture

@Deciphered

Can you you give me an example of using the theme('textimage_image', 'preset', 'text', array('additional', 'text'), 'ext'); in version 6.x-2.x-dev?

Deciphered’s picture

Status: Fixed » Closed (fixed)

@gutomec

Sure.
In your themes template.php file, put the following snippet inside your THEME_preprocess_page() function.

  $vars['title'] = theme('textimage_image', 'page_title', $vars['title']);

That will then return a Textimage version of your page title using the Textimage preset 'page_title'.

If you require more information, please open a new support issue.

8manj-dupe’s picture

Do you also have an example for the 5x version, of the template.php over ride??

(Sorry to re-open the issue, best to provide the example here than open a brand new for such a small request, wicked module by the way, we have it working on www.huddlestone.co.uk)

danielb’s picture

Using the theme('textimage_image', 'preset', 'text', array('additional', 'text'), 'ext'); should prevent all these issues.

Not it does not. Example: Make your page titles textimage, and then delete a node - pay close attention to the "are you sure you want to delete" title.

Of course, being a theme function, it means I can preprocess the text easily and striptags myself.

Deciphered’s picture

@danielb,

Yes and no, the original issue was thus:

For example, a text image displaying "Are you sure you want to delete My Node? shows "em>?".

As you proved, this is fixed, it now shows "Are you sure you want to delete My Node?".

I will not remove the tags/slashes in the case that someone wants tags/slashes in their Textimage. If you don't want it there, you will need to filter it out before passing it to Textimage.

@MonoRob,

I would suggest trying the Textimage Autoinsert module.
And thank you for the compliments, although I can't take all the credit is I am simply the current maintainer of the module.