Welcome! » Log In » Create A New Profile

AutoFormat.LinkifyEmail Option

Posted by bfroehle 
AutoFormat.LinkifyEmail Option
February 13, 2011 11:40PM

I've added an option to automatically linkify e-mail addresses. Here's the commit message:

    Add AutoFormat.LinkifyEmail Option.
    
    If enabled, automatically provide links to e-mail addresses.
    For example,
      Send an e-mail to user@example.com.
    is transformed to
      Send an e-mail to <a href="mailto:user@example.com">user@example.com</a>.
    
    Signed-off-by: Bradley M. Froehle <brad.froehle@gmail.com>

The code is available in the 'linkify-email' branch of http://repo.or.cz/w/htmlpurifier/bfroehle.git.

Re: AutoFormat.LinkifyEmail Option
February 13, 2011 11:42PM
Re: AutoFormat.LinkifyEmail Option
February 15, 2011 10:07AM

The comments in LinkifyEmail.php are... kind of bogus. Could you please fix them? Thanks!

Re: AutoFormat.LinkifyEmail Option
February 15, 2011 01:07PM

Eeks, you are right about the comments. Clearly borrowed from Linkify.php. I've fixed them and done a forced update to the linkify-email branch.

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with &lt; and &gt;.

Auto-paragraphing is enabled. Double newlines will be converted to paragraphs; for single newlines, use the pre tag.

Allowed tags: a, abbr, acronym, b, blockquote, caption, cite, code, dd, del, dfn, div, dl, dt, em, i, ins, kbd, li, ol, p, pre, s, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var.

For inputting literal code such as HTML and PHP for display, use CDATA tags to auto-escape your angled brackets, and pre to preserve newlines:

<pre><![CDATA[
Place code here
]]></pre>

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}

Message: