[FicbookBridge] Fix new lines in content (#3278)

* [FicbookBridge] Fix new lines in content

Sets `$stripRN` in `getSimpleHTMLDOMCached` to `false` and replace new line to `br` through `str_replace()`.

* [FicbookBridge] Add space after comma
This commit is contained in:
Ololbu 2023-03-04 20:12:46 +05:00 committed by GitHub
parent f3f98a117c
commit 5ab949ca55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,8 +135,8 @@ class FicbookBridge extends BridgeAbstract
];
if ($this->getInput('include_contents')) {
$content = getSimpleHTMLDOMCached($item['uri']);
$item['content'] = $content->find('#content', 0);
$content = getSimpleHTMLDOMCached($item['uri'], 86400, [], [], true, true, DEFAULT_TARGET_CHARSET, false);
$item['content'] = str_replace("\n", '<br>', $content->find('#content', 0)->innertext);
}
$this->items[] = $item;