Changeset e7f85bd in github
- Timestamp:
- Aug 30, 2008 8:35:36 AM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- ade8e11
- Parents:
- 8ac6fd0
- File:
-
- 1 edited
-
program/lib/html2text.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/lib/html2text.php
r8ac6fd0 re7f85bd 315 315 var $_link_count = 0; 316 316 317 /** 318 * Boolean flag, true if a table of link URLs should be listed after the text. 319 * 320 * @var boolean $_do_links 321 * @access private 322 * @see html2text() 323 */ 324 var $_do_links = true; 325 317 326 /** 318 327 * Constructor. … … 324 333 * @param string $source HTML content 325 334 * @param boolean $from_file Indicates $source is a file to pull content from 326 * @access public 327 * @return void 328 */ 329 function html2text( $source = '', $from_file = false ) 335 * @param boolean $do_links Indicate whether a table of link URLs is desired 336 * @param integer $width Maximum width of the formatted text, 0 for no limit 337 * @access public 338 * @return void 339 */ 340 function html2text( $source = '', $from_file = false, $do_links = true, $width = 75 ) 330 341 { 331 342 if ( !empty($source) ) { 332 343 $this->set_html($source, $from_file); 333 344 } 345 334 346 $this->set_base_url(); 347 $this->_do_links = $do_links; 348 $this->width = $width; 335 349 } 336 350 … … 350 364 else 351 365 $this->html = $source; 352 353 366 354 367 $this->_converted = false; … … 496 509 function _build_link_list( $link, $display ) 497 510 { 498 if ( substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' || 511 if ( !$this->_do_links ) return $display; 512 513 if ( substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' || 499 514 substr($link, 0, 7) == 'mailto:' ) { 500 515 $this->_link_count++;
Note: See TracChangeset
for help on using the changeset viewer.
