diff options
| author | 2013-07-04 19:38:29 +0200 | |
|---|---|---|
| committer | 2013-07-04 19:38:29 +0200 | |
| commit | eb5f05304c253df90873b94ba52d7093115f3850 (patch) | |
| tree | 1152ab618aa5cf884a1f2f2e2d1926da4167a6be /lib/lib_text.php | |
| parent | 8dd5fd51f74a47e5c80052f27a74cdcd5dd044b9 (diff) | |
| parent | b5f233f6d524ca9f74e9d33bf5692a1a678d7fec (diff) | |
Merge branch 'dev'0.4.0
Diffstat (limited to 'lib/lib_text.php')
| -rw-r--r-- | lib/lib_text.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/lib_text.php b/lib/lib_text.php index 6e8f7b2bf..9792e191e 100644 --- a/lib/lib_text.php +++ b/lib/lib_text.php @@ -86,3 +86,11 @@ function parse_tags ($desc) { return $desc_parse; } + +function lazyimg($content) { + return preg_replace( + '/<img([^<]+)src=([\'"])([^"\']*)([\'"])([^<]*)>/i', + '<img$1src="' . Url::display('/data/grey.gif') . '" data-original="$3"$5>', + $content + ); +}
\ No newline at end of file |
