Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
simba77 committed Jul 5, 2021
1 parent c88d42d commit 89a67f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Providers/Youtube.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public function parse(string $content): string
} catch (InvalidSelectorException $e) {
}

return $document->html();
// We replace it because the standard LIBXML_HTML_NOIMPLIED flag leads to unexpected behavior when working with nodes.
return str_replace(["<html><body>\n", "\n</body></html>"], '', $document->html());
}

protected function getStyles(): string
Expand Down

0 comments on commit 89a67f6

Please sign in to comment.