Ejemplo n.º 1
0
 /**
  * Ensures that space between double-hyphen and closing bracket still matches as a comment delimiter
  *
  * @group ZF-8473
  * @see    http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#h-3.2.4
  * @return void
  */
 public function testFilterCommentsAllowedDelimiterEndingWhiteSpace()
 {
     $input = '<a> <!-- <b> --  > <c>';
     $expected = '  ';
     $this->_filter->setCommentsAllowed(true);
     $this->assertEquals($expected, $this->_filter->filter($input));
 }
Ejemplo n.º 2
0
 /**
  * Ensures that a comment IS removed when comments are flagged as allowed
  *
  * @group ZF-8473
  * @return void
  */
 public function testSpecifyingCommentsAllowedStillStripsComments()
 {
     $filter = $this->_filter;
     $input = '<!-- a comment -->';
     $expected = '';
     $this->_filter->setCommentsAllowed(true);
     $this->assertEquals($expected, $filter($input));
 }