Exemplo n.º 1
0
 /**
  * tidyRepair
  *
  * @param object $article
  *
  * @return  void
  */
 public static function tidyRepair($article)
 {
     $input = \JFactory::getApplication()->input;
     if ('com_content' != $input->get('option')) {
         return;
     }
     if (!$article->introtext && !$article->fulltext) {
         return;
     }
     $article->introtext = HtmlHelper::repair($article->introtext);
     $article->fulltext = HtmlHelper::repair($article->fulltext);
 }
 /**
  * Method to test HtmlHelper::repair for unopened HTML tags.
  *
  * @param string $expected
  * @param string $data
  *
  * @return void
  *
  * @dataProvider repairHtmlUnopenedDataProvider
  * @covers       Windwalker\Helper\HtmlHelper::repair
  * @group        repair
  */
 public function testRepairHtmlUnopened($expected, $data)
 {
     $this->assertSame($expected, HtmlHelper::repair($data, false));
 }