移除table中的回车,临时解决方案

This commit is contained in:
wlx 2010-06-22 02:36:59 +00:00
parent 62242047ab
commit 5fd5098d67
1 changed files with 7 additions and 2 deletions

View File

@ -1096,7 +1096,7 @@ class DataController extends Zend_Controller_Action
{
$line = trim ( $line );
if( trim($line) == '' ) { // empty line, go to next line
if( $line == '' ) { // empty line, go to next line
continue;
}
$first_character = $line{0};
@ -1246,7 +1246,12 @@ class DataController extends Zend_Controller_Action
}
$output = implode ( "\n" , $lines ) ;
//@todo:移除<table></table>中所有的换行符
//可能存在问题
$output=preg_replace('/([a-zA-Z])>\n/m','$1>',$output);
$output=preg_replace('/\n<\//m','</',$output);
// special case: don't return empty table
if( $output == "<table>\n<tr><td></td></tr>\n</table>" ) {
$output = '';