Creates an anchor tag around URLs within a string.
linkURLs(string, protoString, format, linksOnly, separator)
Specifies the string in which to search for potential URLs.
Is reserved.
Specifies the format string: {0} refers to the actual link and {1} refers to the non-linked version of the URL.
Specifies whether to return a string containing only the formatted links, or a string containing the original text with the formatted links embedded where they occurred in the original text:
Specifies the string used to separate links when the linksOnly parameter is set to true (false means the separator is ignored.)
LinkURLs is useful for generating an HTML link in text that has a URL. For example, if string contains ? and Novell?s home page is http://www.novell.com.?, an anchor can be created around http://www.novell.com so that the end user can click on it to browse that page.
Assuming Message.message is: Visit http://www.novell.com. And the template contains these lines:
{SET fmtMsg=toHTML(Message.message)}:{VAR linkURLs(fmtMsg, "", "<A href={0}>{1}</A>" false, "")}
The generated output will be:
Visit <A href=http://www.novell.com>http://www.novell.com</A>
Another example is to assume Message.message is: Visit http://www.novell.com and http://developer.novell.com. And the template contains these lines:
{SET fmtMsg=toHTML(Message.message)}:{VAR linkURLs(fmtMsg, "", "<A href={0}>{1}</A>" true, " ")}
The generated output will be:
Visit http://www.novell.com and developer.novell.com (<A href=http://www.novell.com>http://www.novell.com></A>) (<A href=http://developer.novell.com>http://developer.novell.com></A>)