Login   Register  
PHP Classes
elePHPant
Icontem

lib_text2html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author  
Picture of Mariusz Kaczmarczyk
Name: Mariusz Kaczmarczyk <e-mail contact>
Packages: 2 Browse all classes by Mariusz Kaczmarczyk Browse all classes by
Country: Poland Poland - PHP jobs in Poland
Age: 32
All time rank: Not yet ranked
Week rank: 1906 in Poland Poland


  Detailed description   Download .zip .tar.gz  
Process input HTML code.

Features:

- Parses input text, get HTML tags information;
- Removes unwanted HTML tags (configurable whitelist/blacklist);
- Removes unwanted HTML tag attributes depending on their name/value;
- Formats all HTML tags/attributes as lowercase/uppercase;
- Detects URLs in text and convert to HTML links;
- Encodes HTML special characters to entities, similar to PHP's built-in functions but more configurable;
- Decodes HTML entities (named and numeric) to the corresponding unicode characters (to avoid the problem of double entity encoding);
- Uses additional map file to decode unknown HTML entities;
- Support UTF-8 and ASCII/ISO-8859-1 charsets for HTML entities decode;
- Obfuscates properly writen e-mail addresses using HTML entities;
- Converts newline characters to <br />\n;
- Strips the texts in HTML comments out;
- Replaces arbitrary strings in text (array search/replace mapping).

You can pass the input text for every command individually, or once for the constructor to be chain-processed.

Default process settings (tags and their attributes lists) should be acceptable for most sites.

  Classes of Mariusz Kaczmarczyk  >  lib_text2html  >  Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: lib_text2html
Base name: lib_text2html
Description: Parse and process text and HTML to clean up
Version: 2.0
PHP version: 5.0
License: GNU General Public License (GPL)
All time users: 967 users
All time rank: 3272
Week users: 0 users
Week rank: 2036 Equal
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image HTML HTML generation and processing View top rated classes
Group folder image Text processing Manipulating and validating text data View top rated classes
Group folder image Templates Template processing engines and components View top rated classes
Group folder image Security Security protection and attack detection View top rated classes


  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file lib_text2html Class Class ver. 2.0
Plain text file html_entities.map Data Default HTML entities map, to be placed in the same directory as the class file
Plain text file test.php Example Example usage of the class

Download all files: lib_text2html.tar.gz lib_text2html.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.