[development] HTML in node titles for D5
Walt Daniels
wdlists at optonline.net
Sun Jan 20 14:40:12 UTC 2008
I also need this but what I need is a link. Perhaps [text:url] or something
similar could be changed to <a href="url">text</a>. Is this secure, given
that text:url has been though checkplain?
-----Original Message-----
From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]
On Behalf Of Yuval Hager
Sent: Sunday, January 20, 2008 12:12 AM
To: development at drupal.org
Subject: Re: [development] HTML in node titles for D5
On Sunday 20 January 2008, Andrew ft wrote:
> 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?
>
That's a very good idea! It has the advantage that in all places that output
check_plain($node->title) will show a reasonable string after all.
As long as the required markup is limited - this is the most elegant
solution
I've seen!
Thanks,
--yuval
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.7/1233 - Release Date: 1/19/2008
6:37 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.7/1233 - Release Date: 1/19/2008
6:37 PM
More information about the development
mailing list