X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fapi.php;h=d94cc2942ac071e7644f48857d590372fb2aa1b2;hb=d4644d73392f335a3cc488fbd8935068a567edcf;hp=74b4aaf6e1d85e5cedbf998194c7c57c2813f1bc;hpb=273594af62c960b5a52da5ec1cf6d6bd450415ba;p=friendica.git
diff --git a/include/api.php b/include/api.php
index 74b4aaf6e1..d94cc2942a 100644
--- a/include/api.php
+++ b/include/api.php
@@ -404,14 +404,6 @@
return $ret;
}
- /**
- * apply xmlify() to all values of array $val, recursively
- */
- function api_xmlify($val){
- if (is_bool($val)) return $val?"true":"false";
- if (is_array($val)) return array_map('api_xmlify', $val);
- return xmlify((string) $val);
- }
/**
* load api $templatename for $type and replace $data array
@@ -424,7 +416,7 @@
case "atom":
case "rss":
case "xml":
- $data = api_xmlify($data);
+ $data = array_xmlify($data);
$tpl = get_markup_template("api_".$templatename."_".$type.".tpl");
$ret = replace_macros($tpl, $data);
break;
@@ -483,11 +475,7 @@
$txt = requestdata('htmlstatus');
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
- $txt = preg_replace('##s',
- '[youtube]$1[/youtube]', $txt);
-
- $txt = preg_replace('##s',
- '[youtube]$1[/youtube]', $txt);
+ $txt = html2bb_video($txt);
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.DefinitionImpl', null);