mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 01:25:21 +02:00
test: add feed item test (#3709)
* test: add feed item test also some refactor * yup * yup
This commit is contained in:
parent
cd30c25b08
commit
f421c45b21
10 changed files with 98 additions and 81 deletions
|
@ -6,6 +6,8 @@ class HtmlFormat extends FormatAbstract
|
|||
|
||||
public function stringify()
|
||||
{
|
||||
$queryString = $_SERVER['QUERY_STRING'];
|
||||
|
||||
$extraInfos = $this->getExtraInfos();
|
||||
$formatFactory = new FormatFactory();
|
||||
$buttons = [];
|
||||
|
@ -15,7 +17,7 @@ class HtmlFormat extends FormatAbstract
|
|||
if ($format === 'Html') {
|
||||
continue;
|
||||
}
|
||||
$formatUrl = '?' . str_ireplace('format=Html', 'format=' . $format, htmlentities($_SERVER['QUERY_STRING']));
|
||||
$formatUrl = '?' . str_ireplace('format=Html', 'format=' . $format, htmlentities($queryString));
|
||||
$buttons[] = [
|
||||
'href' => $formatUrl,
|
||||
'value' => $format,
|
||||
|
@ -57,6 +59,7 @@ class HtmlFormat extends FormatAbstract
|
|||
]);
|
||||
// Remove invalid characters
|
||||
ini_set('mbstring.substitute_character', 'none');
|
||||
return mb_convert_encoding($html, $this->getCharset(), 'UTF-8');
|
||||
$html = mb_convert_encoding($html, $this->getCharset(), 'UTF-8');
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue