mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-02-02 11:58:26 +00:00
Filter PR body text when pulling from GitHub
This commit is contained in:
parent
4d5475bc18
commit
1b1eba172e
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
namespace PatchTester\Model;
|
namespace PatchTester\Model;
|
||||||
|
|
||||||
|
use Joomla\CMS\Filter\InputFilter;
|
||||||
use Joomla\CMS\Pagination\Pagination;
|
use Joomla\CMS\Pagination\Pagination;
|
||||||
use Joomla\Registry\Registry;
|
use Joomla\Registry\Registry;
|
||||||
use PatchTester\GitHub\Exception\UnexpectedResponse;
|
use PatchTester\GitHub\Exception\UnexpectedResponse;
|
||||||
@ -371,6 +372,7 @@ class PullsModel extends \JModelDatabase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
$filter = InputFilter::getInstance();
|
||||||
|
|
||||||
foreach ($pulls as $pull)
|
foreach ($pulls as $pull)
|
||||||
{
|
{
|
||||||
@ -396,7 +398,7 @@ class PullsModel extends \JModelDatabase
|
|||||||
$pullData = array(
|
$pullData = array(
|
||||||
(int) $pull->number,
|
(int) $pull->number,
|
||||||
$this->getDb()->quote(\JHtml::_('string.truncate', $pull->title, 150)),
|
$this->getDb()->quote(\JHtml::_('string.truncate', $pull->title, 150)),
|
||||||
$this->getDb()->quote(\JHtml::_('string.truncate', $pull->body, 100)),
|
$this->getDb()->quote(\JHtml::_('string.truncate', $filter->clean($pull->body, 'raw'), 100)),
|
||||||
$this->getDb()->quote($pull->pull_request->html_url),
|
$this->getDb()->quote($pull->pull_request->html_url),
|
||||||
(int) $isRTC,
|
(int) $isRTC,
|
||||||
$this->getDb()->quote($branch),
|
$this->getDb()->quote($branch),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user