latest
  • User Guide
  • Developer Guide
  • Cookbooks
  • Best Practices
  • Reference
    • Modules
    • Actions
    • Controllers
    • Filters
      • Binaries
      • Booleans
      • Dates
      • Encryption
      • Character escaping
        • brlinebreaks
        • escape
        • escape_ical
        • escape_link
        • escapejs
        • escapejson
        • escapexml
        • fix_ampersands
        • force_escape
        • linebreaksbr
        • slugify
        • unescape
        • urlencode
      • Forms
      • HTML
      • Lists
      • Mailing list
      • Menu
      • Miscellaneous
      • Numbers
      • Regular Expressions
      • Resource lists
      • Resources
      • Strings
      • Survey
      • Translation
      • Tuples
      • Variables
    • Tags
    • Global variables
    • Models
    • Services
    • Validators
    • Directory structure
    • Icons
    • Notifications
    • Installation requirements
    • Configuration
    • The Status site
    • Command-line
    • Transport
    • Troubleshooting
    • EDoc reference
  • Glossary
Zotonic
  • Docs »
  • Reference »
  • Filters »
  • Character escaping »
  • escape_link
  • Edit on GitHub

escape_link¶

  • Module: mod_base

Convert any URLs in a plaintext into HTML links, with adding the rel="nofollow" attribute.

Example:

{{ "http://foo.bar/"|escape_link }}

Outputs:

<a href="http://foo.bar/" rel="nofollow">http://foo.bar/</a>

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

See also

urlize

Next Previous

© Copyright 2009–2017, The Zotonic Project (zotonic.com). Revision 727298a2.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.