aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-11-07 08:34:12 +0100
committerGravatar GitHub <noreply@github.com> 2022-11-07 08:34:12 +0100
commit5897487f2f29cd3f29b538919c57988f118461e7 (patch)
tree373c14d17e6906baaf7d09418002a053628734d1 /app/Models/Feed.php
parentf2fe9e2ff36efdf6861ed6ab58d820787d62f8d7 (diff)
Fix path_entries encoding (#4823)
* Fix path_entries encoding #fix https://github.com/FreshRSS/FreshRSS/issues/4815 * Fix preview
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 32b22edf2..f24ec1884 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -145,6 +145,7 @@ class FreshRSS_Feed extends Minz_Model {
public function name($raw = false): string {
return $raw || $this->name != '' ? $this->name : preg_replace('%^https?://(www[.])?%i', '', $this->url);
}
+ /** @return string HTML-encoded URL of the Web site of the feed */
public function website(): string {
return $this->website;
}
@@ -157,6 +158,7 @@ class FreshRSS_Feed extends Minz_Model {
public function priority(): int {
return $this->priority;
}
+ /** @return string HTML-encoded CSS selector */
public function pathEntries(): string {
return $this->pathEntries;
}
@@ -192,6 +194,7 @@ class FreshRSS_Feed extends Minz_Model {
return $this->ttl;
}
+ /** @return mixed attribute (if $key is not blank) or array of attributes, not HTML-encoded */
public function attributes($key = '') {
if ($key == '') {
return $this->attributes;
@@ -301,6 +304,7 @@ class FreshRSS_Feed extends Minz_Model {
public function _priority($value) {
$this->priority = intval($value);
}
+ /** @param string $value HTML-encoded CSS selector */
public function _pathEntries(string $value) {
$this->pathEntries = $value;
}
@@ -320,6 +324,7 @@ class FreshRSS_Feed extends Minz_Model {
$this->mute = $value < self::TTL_DEFAULT;
}
+ /** @param mixed $value Value, not HTML-encoded */
public function _attributes(string $key, $value) {
if ($key == '') {
if (is_string($value)) {