3 * @file mod/update_display.php
4 * See update_profile.php for documentation
10 require_once "mod/display.php";
12 function update_display_content(App $a)
14 $profile_uid = intval($_GET["p"]);
16 header("Content-type: text/html");
17 echo "<!DOCTYPE html><html><body>\r\n";
20 $text = display_content($a, true, $profile_uid);
22 if (DI::pConfig()->get(local_user(), "system", "bandwidth_saver")) {
23 $replace = "<br />" . DI::l10n()->t("[Embedded content - reload page to view]") . "<br />";
24 $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
25 $text = preg_replace($pattern, $replace, $text);
26 $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
27 $text = preg_replace($pattern, $replace, $text);
28 $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
29 $text = preg_replace($pattern, $replace, $text);
30 $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
31 $text = preg_replace($pattern, $replace, $text);
34 echo str_replace("\t", " ", $text);
36 echo "</body></html>\r\n";