diff options
| author | 2022-03-05 16:00:01 +0100 | |
|---|---|---|
| committer | 2022-03-05 16:00:01 +0100 | |
| commit | dc849c3d8781f23a5382dfee5a59b4a868559e8b (patch) | |
| tree | 983cdaceb0e7980f509a2853d7addbe7a3a98a32 /app/Models/Entry.php | |
| parent | da2adaec8a4ea69bf837c7166398568e34b6d066 (diff) | |
Fix HTML base for get full content (#4260)
#fix https://github.com/FreshRSS/FreshRSS/issues/4252
Diffstat (limited to 'app/Models/Entry.php')
| -rw-r--r-- | app/Models/Entry.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 48db5f5c6..f488f5d8d 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -508,6 +508,10 @@ class FreshRSS_Entry extends Minz_Model { * @var phpQueryObject @content */ $content = $doc->find($path); + $bases = $doc->document->getElementsByTagName('base'); + if (!empty($bases[0]) && $bases[0]->getAttribute('href') != '') { + $url = $bases[0]->getAttribute('href'); + } $html = trim(sanitizeHTML($content->__toString(), $url)); phpQuery::unloadDocuments(); return $html; |
