Hi I'm trying to build a simple list of items in the blog. Looking at the API I managed to get all queries right but I'm stuck in the display. Doing something like this in a custom block:

return l("<em>TEST</em>","node/blah");

produces the correct link but the text also includes the em+/em's.

This is a problem because I'm trying to dynamically pass content from t() with %params in it to l().
Any ideas?

Comments

yched’s picture

Have you tried using the last (I think) param in l() : $html = TRUE ?
It states that the text used in the link contains html markup

michelle’s picture

I don't know a lot about t() but I ran into this in a module and the solution was to replace the % with @ because the % makes it add the em tags.

Michelle

corfiot’s picture

Status: Active » Closed (fixed)

yes, the html=TRUE parameter did it.

I'm happy to see it was changed in HEAD to an array like the attributes. Thanks a lot yched!

Michelle, I did not want the removed, I actually wanted it in there as it comes from the theme.

--G