[horde] Notification push with a link
Laura McCord
mccordl at southwestern.edu
Mon Oct 2 09:08:17 PDT 2006
Thanks Chris! That worked perfectly.
-Laura
Chuck Hagenbuch wrote:
> Quoting Laura McCord <mccordl at southwestern.edu>:
>
>> I want to be able to add a link to a notification however using sprintf
>> will only write out the string and not actually produce the link as
>> printf would. Does anyone have any suggestions?
>>
>> This is what I am trying to do:
>> $notification->push(sprintf(_('<a href=\"%s\">test</a>'), $url
>> ),'horde.success');
>
> This has nothing to do with sprintf vs. printf. You need to tell the
> notification system that you're sending HTML content - and since
> you're doing so, you are responsible for escaping the data in the link
> (to avoid javascript injection, etc.).
>
> You want the third arg to push:
> $notification->push($link, 'horde.success', array('content.raw'));
>
> -chuck
>
> --"we are plastered to the windshield of the bus that is time." - Chris
> --Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
More information about the horde
mailing list