[Zope-CMF] URLs, smart text

Tres Seaver tseaver@zope.com
07 Aug 2002 15:32:42 -0400


On Wed, 2002-08-07 at 11:33, Bryan C. Andregg wrote:
> I'd like to allow my members to include URLs in their replies and news item
> submissions and not have to wrap the URL in html to have it displayed as a
> link. Is there a way to do this already (meaning I don't have to write the
> script)?

The WebText class inside the CMFCollector does URL recognition in plain
text;  you could probably lift code from there:

  http://cvs.zope.org/CMF/CMFCollector/WebTextDocument.py

which uses the 'format_webtext' function from:

  http://cvs.zope.org/CMF/CMFCollector/util.py

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com