1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-07 00:56:34 +02:00

[XPathBridge] add option to skip htmlspecialchars (#3672)

This commit is contained in:
User123698745
2023-09-15 01:58:06 +02:00
committed by GitHub
parent 409236e48e
commit 3b91b1d260
3 changed files with 51 additions and 7 deletions

View File

@@ -59,6 +59,17 @@ EOL, 'type' => 'text',
'required' => false
],
'raw_content' => [
'name' => 'Use raw item description',
'title' => <<<"EOL"
Whether to use the raw item description or to replace certain characters with
special significance in HTML by HTML entities (using the PHP function htmlspecialchars).
EOL,
'type' => 'checkbox',
'defaultValue' => false,
'required' => false
],
'uri' => [
'name' => 'Item URL selector',
'title' => <<<"EOL"
@@ -178,6 +189,15 @@ EOL, 'type' => 'checkbox',
return urldecode($this->getInput('content'));
}
/**
* Use raw item content
* @return bool
*/
protected function getSettingUseRawItemContent(): bool
{
return $this->getInput('raw_content');
}
/**
* XPath expression for extracting an item link from the item context
* @return string
@@ -226,9 +246,9 @@ EOL, 'type' => 'checkbox',
/**
* Fix encoding
* @return string
* @return bool
*/
protected function getSettingFixEncoding()
protected function getSettingFixEncoding(): bool
{
return $this->getInput('fix_encoding');
}