diff options
| author | 2013-12-23 00:01:00 +0100 | |
|---|---|---|
| committer | 2013-12-23 00:01:00 +0100 | |
| commit | 11b1d06b8c4672f7dab98f8de5a7f7f95eeeec12 (patch) | |
| tree | ec96ddcb423771fd001c47b7822f9f6c66170767 /lib/lib_rss.php | |
| parent | 2919b9a0b6c7a9e1c8b5ad7f3b6207bd86de2dbc (diff) | |
Chargement différé des iframe
Implémente https://github.com/marienfressinaud/FreshRSS/issues/313
(uniquement pour la vue en articles repliés)
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 4ef06ddbc..a1fadcb24 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -288,6 +288,14 @@ function lazyimg($content) { ); } +function lazyIframe($content) { + return preg_replace( + '/<iframe([^>]+?)src=[\'"]([^"\']+)[\'"]([^>]*)>/i', + '<iframe$1src="about:blank" data-original="$2"$3>', + $content + ); +} + function uTimeString() { $t = @gettimeofday(); return $t['sec'] . str_pad($t['usec'], 6, '0'); |
