<div>There is an added complication with a link in a node in that when the node is presented as a teaser, it will already be a link to the full node page. Because of this we can only implement the hyperlinks when the browser is on the full node page.
</div>
<div> </div>
<div>If we assume the simplest situation where the <strong>whole node</strong> is a link, I would suggest using "[" and "]" as delimiters, something like this:</div>
<div>original node: <strong>text of node [url]<br></strong>on node page after processing: <strong><a href="url">text of node </a></strong></div>
<div>on teaser page after processing:<strong> text of node</strong></div>
<div> </div>
<div>In a more complex situation where you want arbitrary words in the node to be hyperlinked, you can extend the sytax slightly with something like:</div>
<div>original node: <strong>This is my node [with linked text:url] in it</strong><br>on node page after processing: <strong>This is my node <a href="url">with linked text</a> in it</strong>
<div>on teaser page after processing: <strong>This is my node with linked text in it</strong></div><br>I haven't yet written the specific regular expressions you would need for the above syntax. Sometimes it is best to adjust the sytax to make it easy to write the regex.
</div>
<div> </div>
<div class="gmail_quote">On Jan 20, 2008 9:40 AM, Walt Daniels <<a href="mailto:wdlists@optonline.net">wdlists@optonline.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I also need this but what I need is a link. Perhaps [text:url] or something<br>similar could be changed to <a href="url">text</a>. Is this secure, given
<br>that text:url has been though checkplain?<br>
<div>
<div></div>
<div class="Wj3C7c"><br>-----Original Message-----<br>From: <a href="mailto:development-bounces@drupal.org">development-bounces@drupal.org</a> [mailto:<a href="mailto:development-bounces@drupal.org">development-bounces@drupal.org
</a>]<br>On Behalf Of Yuval Hager<br>Sent: Sunday, January 20, 2008 12:12 AM<br>To: <a href="mailto:development@drupal.org">development@drupal.org</a><br>Subject: Re: [development] HTML in node titles for D5<br><br>On Sunday 20 January 2008, Andrew ft wrote:
<br>> Please tell me if this is a bad idea, but how about this as a solution:<br>> If you are only interested in minimal markup, like the ability to use the<br>> <em> tag, what about using a special character to indicate it in the node
<br>> title, and then processing the title at the theme layer (for example with<br>a<br>> regular expression) to convert the characters into tags.<br>> For example, you could use Hello *World!* as the node title and then
<br>> convert this with a simple regular expression to Hello <em>World!</em><br>when<br>> the node is rendered.<br>> This would have the added advantage of keep clean the RSS feed from the<br>> node. It would also be much shorter than putting markup in the title,
<br>> bearing in mind the 255 char limit.<br>> Would this be classified as a hack?<br>><br><br>That's a very good idea! It has the advantage that in all places that output<br><br>check_plain($node->title) will show a reasonable string after all.
<br>As long as the required markup is limited - this is the most elegant<br>solution<br>I've seen!<br><br>Thanks,<br><br>--yuval<br><br></div></div>No virus found in this incoming message.<br>Checked by AVG Free Edition.
<br>Version: 7.5.516 / Virus Database: 269.19.7/1233 - Release Date: 1/19/2008<br>6:37 PM<br><br><br><br>No virus found in this outgoing message.<br>Checked by AVG Free Edition.<br>Version: 7.5.516 / Virus Database: 269.19.7
/1233 - Release Date: 1/19/2008<br>6:37 PM<br><br><br></blockquote></div><br>