diff options
Diffstat (limited to 'lib/html.php')
-rw-r--r-- | lib/html.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/html.php b/lib/html.php index 4a4bea1b..693504b0 100644 --- a/lib/html.php +++ b/lib/html.php @@ -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 * |