[core] Use Parsedown for Markdown parsing (#1783)

This commit is contained in:
Corentin Garcia 2020-10-09 20:29:02 +02:00 committed by GitHub
parent fe166d0216
commit ff98efe8dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 1744 additions and 45 deletions

View file

@ -100,7 +100,9 @@ class NyaaTorrentsBridge extends BridgeAbstract {
//Retrieve data from page contents
$item_title = str_replace(' :: Nyaa', '', $item_html->find('title', 0)->plaintext);
$item_desc = str_get_html(markdownToHtml($item_html->find('#torrent-description', 0)->innertext));
$item_desc = str_get_html(
markdownToHtml(html_entity_decode($item_html->find('#torrent-description', 0)->innertext))
);
$item_author = extractFromDelimiters($item_html->outertext, 'href="/user/', '"');
$item_date = intval(extractFromDelimiters($item_html->outertext, 'data-timestamp="', '"'));