public function getContent()
 {
     $cntattr = count($this->attribute);
     $cnt = $this->separatorCount + 1 > $cntattr ? $cntattr : $this->separatorCount + 1;
     if ($cnt == 1) {
         list($href, $label) = $this->config->processLink($this->wikiContentArr[0], $this->name);
         return '<a href="' . $this->_doEscape($href) . '">' . $this->_doEscape($label) . '</a>';
     } else {
         list($href, $label) = $this->config->processLink($this->wikiContentArr[1], $this->name);
         $this->wikiContentArr[1] = $href;
         return parent::getContent();
     }
 }
示例#2
0
 public function getContent()
 {
     $cntattr = count($this->attribute);
     $cnt = $this->separatorCount + 1 > $cntattr ? $cntattr : $this->separatorCount + 1;
     if ($cnt == 1) {
         $contents = $this->wikiContentArr[0];
         $href = $contents;
         if (strpos($href, 'javascript:') !== false) {
             // for security reason
             $href = '#';
         }
         if (strlen($contents) > 40) {
             $contents = substr($contents, 0, 40) . '(..)';
         }
         return '<a href="' . htmlspecialchars($href) . '">' . htmlspecialchars($contents) . '</a>';
     } else {
         if (strpos($this->wikiContentArr[1], 'javascript:') !== false) {
             // for security reason
             $this->wikiContentArr[1] = '#';
         }
         return parent::getContent();
     }
 }
示例#3
0
 public function getContent(){
     $cntattr=count($this->attribute);
     $cnt=($this->separatorCount + 1 > $cntattr?$cntattr:$this->separatorCount+1);
     list($href, $label) = $this->config->processLink($this->wikiContentArr[0], $this->name);
     if($cnt == 1 ){
         return '<a href="'.htmlspecialchars(trim($href)).'">'.htmlspecialchars($label).'</a>';
     }else{
         $this->wikiContentArr[0] = $href;
         return parent::getContent();
     }
 }