# escape\_link

Source: https://zotonic.com/docs/1927/escape_link

URI: https://zotonic.com/id/1927

Language: en



Convert any URLs in a plaintext into HTML links, with adding the `rel="nofollow"` attribute, and replaces all newlines with `<br>` tags.

Example:

```django
{{ "Hello http://foo.bar/\n\nAnd bye."|escape_link }}
```

Outputs:

```django
"Hello <a href="http://foo.bar/" rel="noopener nofollow noreferrer">http://foo.bar/</a><br /><br />And bye."
```

This filter is very useful when displaying user-generated plaintexts, like comments.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1927?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1927?language=en>)
