3 // See update_profile.php for documentation
6 use Friendica\Core\PConfig;
8 require_once("include/group.php");
9 require_once "mod/display.php";
11 function update_display_content(App $a)
13 $profile_uid = intval($_GET["p"]);
15 header("Content-type: text/html");
16 echo "<!DOCTYPE html><html><body>\r\n";
19 $text = display_content($a, $profile_uid);
20 $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
21 $replace = "<img\${1} dst=\"\${2}\"";
22 $text = preg_replace($pattern, $replace, $text);
24 if (PConfig::get(local_user(), "system", "bandwith_saver")) {
25 $replace = "<br />" . t("[Embedded content - reload page to view]") . "<br />";
26 $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
27 $text = preg_replace($pattern, $replace, $text);
28 $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
29 $text = preg_replace($pattern, $replace, $text);
30 $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
31 $text = preg_replace($pattern, $replace, $text);
32 $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
33 $text = preg_replace($pattern, $replace, $text);
36 echo str_replace("\t", " ", $text);
38 echo "</body></html>\r\n";