X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fparse_url.php;h=1393a15d36b95bd94a9ab69ebd6fa6a38cddacb7;hb=c35feb27f2d5d9a1dc9cf885517953663dae9748;hp=9adee8f65cd8d7d9c261f6d16522ea2ed0859cd9;hpb=ac0ad8fecf56ee8f299cd4a0d496b777efd9f7d0;p=friendica.git diff --git a/mod/parse_url.php b/mod/parse_url.php index 9adee8f65c..1393a15d36 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -97,6 +97,28 @@ function parseurl_getsiteinfo($url) { $xpath = new DomXPath($doc); + $list = $xpath->query("//meta[@content]"); + foreach ($list as $node) { + $attr = array(); + if ($node->attributes->length) + foreach ($node->attributes as $attribute) + $attr[$attribute->name] = $attribute->value; + + if (@$attr["http-equiv"] == 'refresh') { + $path = $attr["content"]; + $pathinfo = explode(";", $path); + $content = ""; + foreach ($pathinfo AS $value) { + if (substr(strtolower($value), 0, 4) == "url=") + $content = substr($value, 4); + } + if ($content != "") { + $siteinfo = parseurl_getsiteinfo($content); + return($siteinfo); + } + } + } + //$list = $xpath->query("head/title"); $list = $xpath->query("//title"); foreach ($list as $node) @@ -236,7 +258,8 @@ function parse_url_content(&$a) { $str_tags = ''; $textmode = false; - if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) + + if(local_user() && (! feature_enabled(local_user(),'richtext'))) $textmode = true; //if($textmode)