[development] HTML in node titles for D5

Andrew ft andrewft at gmail.com
Sat Jan 19 23:54:54 UTC 2008

Please tell me if this is a bad idea, but how about this as a solution:
If you are only interested in minimal markup, like the ability to use the
<em> tag, what about using a special character to indicate it in the node
title, and then processing the title at the theme layer (for example with a
regular expression) to convert the characters into tags.
For example, you could use Hello *World!* as the node title and then convert
this with a simple regular expression to Hello <em>World!</em> when the node
is rendered.
This would have the added advantage of keep clean the RSS feed from the
node. It would also be much shorter than putting markup in the title,
bearing in mind the 255 char limit.
Would this be classified as a hack?

On Jan 18, 2008 1:37 AM, Yuval Hager <yuval at avramzon.net> wrote:

> On Thursday 17 January 2008, Moshe Weitzman wrote:
> > try it and you will see. titles in rss reeds and emails will have
> > markup in them, for example. and many places run
> > check_plain($node->title) before output.
> >
> I believe hacking core should be the last option in terms of
> manageability, so
> I've opened an issue on this - http://drupal.org/node/211475. Patches are
> welcome.
> --y
> > > I am just curious why the nyobserver site hacked core and not used a
> cck
> > > field.. (reading through the comments in that thread I see some
> reference
> > > to this challenge - http://drupal.org/nyobserver#comment-228510)
>  --
> Yuval Hager
> [T] +972-77-341-4155
> [@] yuval at avramzon.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080119/22cf971e/attachment.htm 

More information about the development mailing list