use WikiFormat class

This commit is contained in:
wlx 2011-10-16 15:24:10 +00:00
parent ada5c49b36
commit 69502b9a80
1 changed files with 3 additions and 2 deletions

View File

@ -557,8 +557,9 @@ class DataController extends Zend_Controller_Action
$id=$row->id; $id=$row->id;
$uuid=$row->uuid; $uuid=$row->uuid;
$this->view->metadata=$row; $this->view->metadata=$row;
//提前对表格进行预处理 //提前对表格进行预处理
$this->view->metadata->description=$this->parseTable($this->view->escape($row->description)); $wiki=new WikiFormat();
$this->view->metadata->description=$wiki->parseTable($this->view->escape($row->description));
//处理外部链接 //处理外部链接
$this->view->metadata->description=preg_replace('/\[\s*(http:\/\/.+?)\s+(.*?)\]/m','<a href="$1">$2</a>',$this->view->metadata->description); $this->view->metadata->description=preg_replace('/\[\s*(http:\/\/.+?)\s+(.*?)\]/m','<a href="$1">$2</a>',$this->view->metadata->description);
if (is_numeric($row->projection)) if (is_numeric($row->projection))