linkEncodedURLs

Creates an anchor tag around URLs within a string and URL encodes the link text.

Syntax

linkEncodedURLs(string, protoString, format, linksOnly, separator)

Parameters

string

Specifies the string in which to search for potential URLs.

protoString

Is reserved.

format

Specifies the format string: {0} refers to the actual link and {1} refers to the non-linked version of the URL.

linksOnly

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:

  • true Returns a string that only has the links found in the string parameter. The links will be formatted as per the format parameter, and will be separated by the string specified with the separator parameter.
  • false Returns a string containing the full contents of the string parameter with the formatted links embedded in it as they occurred in the original string.
separator

Specifies the string used to separate links when the linksOnly parameter is set to true (false means the separator is ignored.)

Remarks

The linkEncodedURLs method works just like linkURLs, except that the resulting link is URL encoded.