I have a massive problem with this function:
http://api.drupal.org/api/function/t

The documentation goes to great length to point out that you shouldn't put HTML tags into a string. But then it makes one exception for hyperlinks, for purposes of context. At the same time, when I am writing a config setting into a module, I need to ability to bold certain words or italicise them and all the typical stuff one might do in a word processor, which t() doesn't allow (in principal) - without using the placeholder system that introduces the same context problems that inline links were allowed for.

I don't know what to suggest other than it should become acceptable that HTML is allowed, or some other system of markup is made for strong, em, a, etc..

The current t() function philosophy is neither consistent in it's allowance of HTML, nor does it permit me to use the markup I need to make the phrase appear correctly.

Then there is another problem if you just allow HTML - links put through the l() function can be themed in drupal 7, so I would prefer to use the l() function, rather than inline HTML.

Comments

danielb’s picture

Well I've just found a handbook page that says inline HTML is ok
http://drupal.org/node/322774

That makes me mostly happy, except for the themeable l() func thing.