diff --git a/include/conversation.php b/include/conversation.php
index 7a0bf6c400..c10a7bec73 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -195,7 +195,7 @@ function localize_item(&$item)
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
$obj = XML::parseString($xmlhead.$item['object']);
- $links = XML::parseString($xmlhead."".XML::unxmlify($obj->link)."");
+ $links = XML::parseString($xmlhead."".XML::unescape($obj->link)."");
$Bname = $obj->title;
$Blink = "";
diff --git a/include/text.php b/include/text.php
index fadd375921..5da54b5fc9 100644
--- a/include/text.php
+++ b/include/text.php
@@ -974,9 +974,9 @@ function get_cats_and_terms($item)
if ($cnt) {
foreach ($matches as $mtch) {
$categories[] = [
- 'name' => XML::xmlify(FileTag::decode($mtch[1])),
+ 'name' => XML::escape(FileTag::decode($mtch[1])),
'url' => "#",
- 'removeurl' => ((local_user() == $item['uid'])?'filerm/' . $item['id'] . '?f=&cat=' . XML::xmlify(FileTag::decode($mtch[1])):""),
+ 'removeurl' => ((local_user() == $item['uid'])?'filerm/' . $item['id'] . '?f=&cat=' . XML::escape(FileTag::decode($mtch[1])):""),
'first' => $first,
'last' => false
];
@@ -995,9 +995,9 @@ function get_cats_and_terms($item)
if ($cnt) {
foreach ($matches as $mtch) {
$folders[] = [
- 'name' => XML::xmlify(FileTag::decode($mtch[1])),
+ 'name' => XML::escape(FileTag::decode($mtch[1])),
'url' => "#",
- 'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&term=' . XML::xmlify(FileTag::decode($mtch[1])) : ""),
+ 'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&term=' . XML::escape(FileTag::decode($mtch[1])) : ""),
'first' => $first,
'last' => false
];
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 6771a21575..0f001b11a2 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -256,7 +256,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
$xml = XML::parseString($res);
$status = (int) $xml->status;
- $message = XML::unxmlify($xml->message); // human readable text of what may have gone wrong.
+ $message = XML::unescape($xml->message); // human readable text of what may have gone wrong.
switch ($status) {
case 0:
info(L10n::t("Confirmation completed successfully.") . EOL);
diff --git a/mod/filer.php b/mod/filer.php
index d61f67e1ef..3508079400 100644
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -18,7 +18,7 @@ function filer_content(App $a)
killme();
}
- $term = XML::unxmlify(trim(defaults($_GET, 'term', '')));
+ $term = XML::unescape(trim(defaults($_GET, 'term', '')));
$item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
Logger::log('filer: tag ' . $term . ' item ' . $item_id);
diff --git a/mod/filerm.php b/mod/filerm.php
index 60ac439bf8..335b27b320 100644
--- a/mod/filerm.php
+++ b/mod/filerm.php
@@ -13,8 +13,8 @@ function filerm_content(App $a)
killme();
}
- $term = XML::unxmlify(trim($_GET['term']));
- $cat = XML::unxmlify(trim($_GET['cat']));
+ $term = XML::unescape(trim($_GET['term']));
+ $cat = XML::unescape(trim($_GET['cat']));
$category = (($cat) ? true : false);
diff --git a/mod/photos.php b/mod/photos.php
index 0deb164b39..69b1972d4c 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -683,15 +683,15 @@ function photos_post(App $a)
$arr['body'] .= "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ']' . '[img]' . System::baseUrl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '[/img][/url]' . "\n" ;
$arr['object'] = '' . "\n";
$arr['target'] = '' . ACTIVITY_OBJ_IMAGE . '' . $p[0]['desc'] . ''
. System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '';
- $arr['target'] .= '' . XML::xmlify('' . "\n" . '') . '';
+ $arr['target'] .= '' . XML::escape('' . "\n" . '') . '';
$item_id = Item::insert($arr);
}
diff --git a/mod/poco.php b/mod/poco.php
index 119250f2fd..08677ef8d4 100644
--- a/mod/poco.php
+++ b/mod/poco.php
@@ -376,7 +376,7 @@ function poco_init(App $a) {
if ($format === 'xml') {
header('Content-type: text/xml');
- echo Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), XML::arrayXmlify(['$response' => $ret]));
+ echo Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), XML::arrayEscape(['$response' => $ret]));
killme();
}
if ($format === 'json') {
diff --git a/mod/poke.php b/mod/poke.php
index e459be345f..60ed5c402e 100644
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -125,9 +125,9 @@ function poke_init(App $a)
$arr['body'] = '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' . ' ' . L10n::t($verbs[$verb][0]) . ' ' . '[url=' . $target['url'] . ']' . $target['name'] . '[/url]';
$arr['object'] = '' . "\n";
$item_id = Item::insert($arr);
diff --git a/mod/profile.php b/mod/profile.php
index b92b8453e6..cfbe07dadb 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -210,7 +210,7 @@ function profile_content(App $a, $update = 0)
$commvisitor = $commpage && $remote_contact;
$a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], $a->profile['profile_uid'], true);
- $a->page['aside'] .= Widget::categories(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], (!empty($category) ? XML::xmlify($category) : ''));
+ $a->page['aside'] .= Widget::categories(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], (!empty($category) ? XML::escape($category) : ''));
$a->page['aside'] .= Widget::tagCloud();
if (Security::canWriteToUserWall($a->profile['profile_uid'])) {
diff --git a/mod/subthread.php b/mod/subthread.php
index 7a8ada08b5..425306b6f7 100644
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -88,7 +88,7 @@ function subthread_content(App $a) {
$post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
$objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
- $link = XML::xmlify('' . "\n") ;
+ $link = XML::escape('' . "\n") ;
$body = $item['body'];
$obj = <<< EOT
diff --git a/mod/tagger.php b/mod/tagger.php
index 8b7e7d0040..dd859e61cd 100644
--- a/mod/tagger.php
+++ b/mod/tagger.php
@@ -67,7 +67,7 @@ function tagger_content(App $a) {
}
$uri = Item::newURI($owner_uid);
- $xterm = XML::xmlify($term);
+ $xterm = XML::escape($term);
$post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
@@ -77,9 +77,9 @@ function tagger_content(App $a) {
$href = System::baseUrl() . '/display/' . $item['guid'];
}
- $link = XML::xmlify('' . "\n") ;
+ $link = XML::escape('' . "\n") ;
- $body = XML::xmlify($item['body']);
+ $body = XML::escape($item['body']);
$target = <<< EOT
diff --git a/src/Content/Widget.php b/src/Content/Widget.php
index 3e076729e1..397a1863d3 100644
--- a/src/Content/Widget.php
+++ b/src/Content/Widget.php
@@ -190,7 +190,7 @@ class Widget
if ($cnt) {
foreach ($matches as $mtch)
{
- $unescaped = XML::xmlify(FileTag::decode($mtch[1]));
+ $unescaped = XML::escape(FileTag::decode($mtch[1]));
$terms[] = array('name' => $unescaped, 'selected' => (($selected == $unescaped) ? 'selected' : ''));
}
}
@@ -230,7 +230,7 @@ class Widget
if ($cnt) {
foreach ($matches as $mtch) {
- $unescaped = XML::xmlify(FileTag::decode($mtch[1]));
+ $unescaped = XML::escape(FileTag::decode($mtch[1]));
$terms[] = array('name' => $unescaped, 'selected' => (($selected == $unescaped) ? 'selected' : ''));
}
}
diff --git a/src/Model/Event.php b/src/Model/Event.php
index 1f0b44693f..f4df6ac9f6 100644
--- a/src/Model/Event.php
+++ b/src/Model/Event.php
@@ -303,8 +303,8 @@ class Event extends BaseObject
$item = Item::selectFirst(['id'], ['event-id' => $event['id'], 'uid' => $event['uid']]);
if (DBA::isResult($item)) {
- $object = '