]> git.mxchange.org Git - friendica.git/blob - mod/update_display.php
Merge pull request #1338 from annando/1501-global-contacts
[friendica.git] / mod / update_display.php
1 <?php
2
3 // See update_profile.php for documentation
4
5 require_once('mod/display.php');
6 require_once('include/group.php');
7
8 function update_display_content(&$a) {
9
10         $profile_uid = intval($_GET['p']);
11
12         header("Content-type: text/html");
13         echo "<!DOCTYPE html><html><body>\r\n";
14         echo "<section>";
15
16
17         $text = display_content($a,$profile_uid);
18         $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
19         $replace = "<img\${1} dst=\"\${2}\"";
20         $text = preg_replace($pattern, $replace, $text);
21
22         $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
23         $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
24         $text = preg_replace($pattern, $replace, $text);
25         $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
26         $text = preg_replace($pattern, $replace, $text);
27         $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
28         $text = preg_replace($pattern, $replace, $text);
29         $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
30         $text = preg_replace($pattern, $replace, $text);
31
32
33         echo str_replace("\t",'       ',$text);
34         echo "</section>";
35         echo "</body></html>\r\n";
36         killme();
37
38 }