I'm using Heartbeat and Heartbeat Token in D7, I'm only doing an activity stream for nodes that have a photo field, and I wanna add a small photo on the stream message. I added something like !username has added !node_type !node_title <img src="[node:field_photo_file]" width="65" height="65"> but it filters out the html when it renders (but it saves). The token alone works, it gives the path.

I read on a d6 issue for heartbeat that you have to set the allowed tags somewhere on heartbeat's global settings but I've been going in circles and into every page imaginable on my drupal site and I can't find anything, how can I get the HTML to render?

Comments

Stalski’s picture

Status: Active » Closed (won't fix)

There is a global setting for it in heartbeat itself. That should work fine if you allow image there.

I must say my preferred approach is to add a token myself where the image is rendered custom, not with that image tag in the message. So the answer is : create a custom token for your gallery image in code, then use that token as replacement of !image

Regards

Nicolino77’s picture

I enabled the tags "img" and "src" in Heartbeat settings.

But it renders only a small ?-Box.
The token alone works and gives the path.

How is this going to work?

Thanks.

Nicolino77’s picture

Ok, got it. The HTML tags ware alright, but I had to insert img src instructions to the message with the photo file token at the end.

Nicolino77’s picture

Issue summary: View changes

forgot code tags