mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-10 03:26:23 +02:00
refactor: general code base refactor (#2950)
* refactor * fix: bug in previous refactor * chore: exclude phpcompat sniff due to bug in phpcompat * fix: do not leak absolute paths * refactor/fix: batch extensions checking, fix DOS issue
This commit is contained in:
@ -98,6 +98,15 @@ function sanitize(
|
||||
return $htmlContent;
|
||||
}
|
||||
|
||||
function sanitize_html(string $html): string
|
||||
{
|
||||
$html = str_replace('<script', '<‌script', $html); // Disable scripts, but leave them visible.
|
||||
$html = str_replace('<iframe', '<‌iframe', $html);
|
||||
$html = str_replace('<link', '<‌link', $html);
|
||||
// We leave alone object and embed so that videos can play in RSS readers.
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace background by image
|
||||
*
|
||||
|
Reference in New Issue
Block a user