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