]> git.mxchange.org Git - friendica.git/blob - mod/update_community.php
ping: cleanup
[friendica.git] / mod / update_community.php
1 <?php
2
3 // See update_profile.php for documentation
4
5 require_once('mod/community.php');
6
7 function update_community_content(&$a) {
8
9         header("Content-type: text/html");
10         echo "<!DOCTYPE html><html><body>\r\n";
11         echo "<section>";
12
13         $text = community_content($a,true);
14         $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
15         $replace = "<img\${1} dst=\"\${2}\"";
16         $text = preg_replace($pattern, $replace, $text);
17
18                 $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
19         $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
20         $text = preg_replace($pattern, $replace, $text);
21         $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
22         $text = preg_replace($pattern, $replace, $text);
23         $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
24         $text = preg_replace($pattern, $replace, $text);
25         $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
26         $text = preg_replace($pattern, $replace, $text);
27
28         echo str_replace("\t",'       ',$text);
29         echo "</section>";
30         echo "</body></html>\r\n";
31         killme();
32
33 }