Overview

Packages

  • Text
    • Filter

Classes

  • Horde_Text_Filter
  • Horde_Text_Filter_Base
  • Horde_Text_Filter_Bbcode
  • Horde_Text_Filter_Cleanascii
  • Horde_Text_Filter_Cleanhtml
  • Horde_Text_Filter_Dimsignature
  • Horde_Text_Filter_Emails
  • Horde_Text_Filter_Emoticons
  • Horde_Text_Filter_Environment
  • Horde_Text_Filter_Exception
  • Horde_Text_Filter_Highlightquotes
  • Horde_Text_Filter_Html2text
  • Horde_Text_Filter_JavascriptMinify
  • Horde_Text_Filter_JavascriptMinify_JsMin
  • Horde_Text_Filter_Linkurls
  • Horde_Text_Filter_Simplemarkup
  • Horde_Text_Filter_Space2html
  • Horde_Text_Filter_Tabs2spaces
  • Horde_Text_Filter_Text2html
  • Horde_Text_Filter_Translation
  • Horde_Text_Filter_Words
  • Horde_Text_Filter_Xss
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Text_Filter_Linkurls

The Horde_Text_Filter_Linkurls:: class turns all URLs in the text into hyperlinks. The regex used is adapted from John Gruber's: http://daringfireball.net/2010/07/improved_regex_for_matching_urls

Changes: - Require at least one slash after the protocol. Horde's other filters don't expect us to match mailto: as part of these filters, so don't. - Limit the URL protocol to 20 characters to avoid PCRE problems. - Allow "+" characters in URL protocols (like svn+ssh://).

Parameters: - callback: (string) A callback function that the URL is passed through before being set as the href attribute. Must be a string with the function name, the function must take the original URL as the first and only parameter. DEFAULT: No callback - class: (string) The CSS class of the generated links. DEFAULT: none - encode: (boolean) Whether to escape special HTML characters in the URLs and finally "encode" the complete tag so that it can be decoded later with the decode() method. This is useful if you want to run htmlspecialchars() or similar after using this filter. DEFAULT: false - nofollow: (boolean) Whether to set the 'rel="nofollow"' attribute on links. DEFAULT: false - target: (string) The link target. DEFAULT: '_blank'

Copyright 2003-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Horde_Text_Filter_Base
Extended by Horde_Text_Filter_Linkurls
Package: Text\Filter
Category: Horde
License: LGPL 2.1
Author: Tyler Colbert tyler@colberts.us
Author: Jan Schneider jan@horde.org
Author: Chuck Hagenbuch chuck@horde.org
Located at Horde/Text/Filter/Linkurls.php
Methods summary
public static string
# getRegex( )

Return the regex used to search for links.

Return the regex used to search for links.

Returns

string
The regex string.
public static
# initializeRegex( )

Initialize the regex for this instance.

Initialize the regex for this instance.

public array
# getPatterns( )

Returns a hash with replace patterns.

Returns a hash with replace patterns.

Returns

array
Patterns hash.

Overrides

Horde_Text_Filter_Base::getPatterns()
public
# callback( mixed $match )
public static string
# decode( string $text )

"Decodes" the text formerly encoded by using the "encode" parameter.

"Decodes" the text formerly encoded by using the "encode" parameter.

Parameters

$text
An encoded text.

Returns

string
The decoded text.
Methods inherited from Horde_Text_Filter_Base
__construct(), postProcess(), preProcess()
Properties summary
public static string $regex

Link-finding regex

Link-finding regex

# ''
API documentation generated by ApiGen