Пример #1
0
 public function testStripTags()
 {
     $this->assertEquals('three', $this->_helper->stripTags('<two>three</two>'));
 }
Пример #2
0
 /**
  * Wrapper for standart strip_tags() function with extra functionality for html entities
  *
  * @param string $data
  * @param string $allowableTags
  * @param bool $escape
  * @return string
  */
 public function stripTags($data, $allowableTags = null, $escape = false)
 {
     if (method_exists(Mage::helper('core'), 'stripTags')) {
         return parent::stripTags($data, $allowableTags = null, $escape = false);
     }
     $result = strip_tags($data, $allowableTags);
     return $escape ? $this->escapeHtml($result, $allowableTags) : $result;
 }