PHP String Slicer

Given a properly nested HTML string it will parse and truncate the string to a specified length while stripping specified properties and tags. This allows you to black-list properties a user may enter to spoof interface elements, JavaScript, or CSS. The primary function is the truncation and ideally from a trusted source. If you need proper HTML validation get a more robust package. I was unable to find a simple solution for truncating arbitrary user text from a trusted source (a CMS back end) and this script was the result. If you make modifications which increase the functionality of this script please let me know. This is made for PHP 4.3 and up. It is a class set up with "fake private" functions (starting with underscores) so has a clean interface provided you respect it by not directly modifying or accessing the state.

 
Visit Site:
PHP String Slicer
Version:
1.0 
Filed in:
PHP / Scripts & Programs / XML & PHP
Platforms:
LinuxMicrosoft WindowsUnixApple Mac OS XSun SolarisApacheMicrosoft IIS 
Databases:
No Database 
Date Added:
Jun 15, 2009 
Last Updated:
Jul 2, 2009 

License and Pricing Information

GPL

Contact maxmike@gmail.com if you find this script handy please. If you need a different license I am willing to discuss that on a case by case basis.

Price: $0.00 USD

Publisher site visits: 42
Average rating: 0.00
Total ratings: 0

Be the first to review this listing!

Publisher Info

Author:
Michael Hamilton 

Share this Listing