require("js-whatever/js/escape-with-links")(text, catchSpaces, target, className) → {string}
HTML escapes a string, replacing any hyperlinks found with <a> tags
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | The text to escape |
catchSpaces |
boolean | Whether spaces should be treated as part of the link (true) or as the end of the |
target |
string | The 'target' attribute for the <a> tag of any links found, e.g. '_blank' |
className |
string | The class to put on the <a> tag of any links found |
- Source:
Returns:
The original string, HTML escaped and with links wrapped in <a> tags
- Type
- string
- Source: