~tsep-dev/tsep/0.9-beta

« back to all changes in this revision

Viewing changes to branches/symfony/app/vendors/html_to_text.php

  • Committer: geoffreyfishing
  • Date: 2011-01-11 23:46:12 UTC
  • Revision ID: svn-v4:ae0de26e-ed09-4cbe-9a20-e40b4c60ac6c::125
Created a symfony branch for future migration to symfony

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php 
 
2
/**
 
3
 * Remove HTML tags, including invisible text such as style and
 
4
 * script code, and embedded objects.  Add line breaks around
 
5
 * block-level tags to prevent word joining after tag removal.
 
6
 */
 
7
 
 
8
//TODO:Fix this to work on invalid HTML
 
9
 
 
10
 
 
11
function html_to_text( $html ){
 
12
 
 
13
        $text = strip_tags($html);
 
14
        
 
15
        return $text;
 
16
 
 
17
}