diff --git a/include/conversation.php b/include/conversation.php
index b129b7d14..d6ad4f11b 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -994,6 +994,7 @@ function builtin_activity_puller($item, &$conv_responses) {
function format_like($cnt, array $arr, $type, $id) {
$o = '';
$expanded = '';
+ $phrase = '';
if ($cnt == 1) {
$likers = $arr[0];
diff --git a/src/Core/Renderer.php b/src/Core/Renderer.php
index 44b56fcba..2ca91b4b6 100644
--- a/src/Core/Renderer.php
+++ b/src/Core/Renderer.php
@@ -48,29 +48,29 @@ class Renderer extends BaseObject
'internal' => '',
'smarty3' => '}}'
];
-
- /**
- * @brief This is our template processor
- *
- * @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
- * @param array $r key value pairs (search => replace)
- *
- * @return string substituted string
- */
- public static function replaceMacros($s, $r)
+
+ /**
+ * @brief This is our template processor
+ *
+ * @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
+ * @param array $vars key value pairs (search => replace)
+ *
+ * @return string substituted string
+ */
+ public static function replaceMacros($s, $vars)
{
$stamp1 = microtime(true);
$a = self::getApp();
// pass $baseurl to all templates
- $r['$baseurl'] = System::baseUrl();
+ $vars['$baseurl'] = System::baseUrl();
$t = self::getTemplateEngine();
try {
- $output = $t->replaceMacros($s, $r);
+ $output = $t->replaceMacros($s, $vars);
} catch (Exception $e) {
echo "
" . __FUNCTION__ . " : " . $e->getMessage() . " ";
- killme();
+ exit();
}
$a->saveTimestamp($stamp1, "rendering");
diff --git a/src/Render/FriendicaSmarty.php b/src/Render/FriendicaSmarty.php
index 8ecea0518..413d746dc 100644
--- a/src/Render/FriendicaSmarty.php
+++ b/src/Render/FriendicaSmarty.php
@@ -42,6 +42,8 @@ class FriendicaSmarty extends Smarty
$this->left_delimiter = Renderer::getTemplateLeftDelimiter('smarty3');
$this->right_delimiter = Renderer::getTemplateRightDelimiter('smarty3');
+ $this->escape_html = true;
+
// Don't report errors so verbosely
$this->error_reporting = E_ALL & ~E_NOTICE;
}
diff --git a/view/templates/acl_selector.tpl b/view/templates/acl_selector.tpl
index 7c68a7306..48706535f 100644
--- a/view/templates/acl_selector.tpl
+++ b/view/templates/acl_selector.tpl
@@ -17,10 +17,10 @@
{{if $networks}}
-{{$emailcc}}
+{{$emailcc}}
{{if $jotnets}}
-{{$jotnets}}
+{{$jotnets nofilter}}
{{/if}}{{/if}}
{{$title}} - {{$page}}
-
{{$description}}
+
{{$description nofilter}}
@@ -58,6 +58,6 @@
-
+
diff --git a/view/templates/admin/logs.tpl b/view/templates/admin/logs.tpl
index b2e6357a9..a218a38f5 100644
--- a/view/templates/admin/logs.tpl
+++ b/view/templates/admin/logs.tpl
@@ -2,13 +2,13 @@
{{$title}} - {{$page}}
diff --git a/view/templates/admin/settings_features.tpl b/view/templates/admin/settings_features.tpl
index 1ca0708bf..f0b696fae 100644
--- a/view/templates/admin/settings_features.tpl
+++ b/view/templates/admin/settings_features.tpl
@@ -17,7 +17,7 @@
{{/foreach}}
-
+
{{/foreach}}
diff --git a/view/templates/admin/site.tpl b/view/templates/admin/site.tpl
index 34b1e3b1b..dd40654b5 100644
--- a/view/templates/admin/site.tpl
+++ b/view/templates/admin/site.tpl
@@ -39,7 +39,7 @@
});
-
{{$title|escape}} - {{$page|escape}}
+
{{$title}} - {{$page}}
@@ -173,8 +173,8 @@
{{$relocate}}
{{$relocate_warning}}
{{include file="field_input.tpl" field=$relocate_url}}
-
-
+
+
diff --git a/view/templates/admin/tos.tpl b/view/templates/admin/tos.tpl
index 75244924b..d4e1bcb48 100644
--- a/view/templates/admin/tos.tpl
+++ b/view/templates/admin/tos.tpl
@@ -6,11 +6,11 @@
{{include file="field_checkbox.tpl" field=$displaytos}}
{{include file="field_checkbox.tpl" field=$displayprivstatement}}
{{include file="field_textarea.tpl" field=$tostext}}
-
+
{{$preview}}
{{for $i=1 to 3}}
- {{$privtext[$i]}}
+ {{$privtext[$i] nofilter}}
{{/for}}
diff --git a/view/templates/admin/users.tpl b/view/templates/admin/users.tpl
index f06b0f973..88feb6136 100644
--- a/view/templates/admin/users.tpl
+++ b/view/templates/admin/users.tpl
@@ -35,8 +35,8 @@
{{$u.email}}
-
-
+
+
@@ -46,7 +46,7 @@
-
+
{{else}}
{{$no_pending}}
{{/if}}
@@ -79,8 +79,8 @@
{{foreach $users as $u}}
-
- {{$u.name}}
+
+ {{$u.name}}
{{$u.email}}
{{$u.register_date}}
{{$u.login_date}}
@@ -94,8 +94,8 @@
{{/if}}
{{if $u.is_deletable}}
-
-
+
+
{{else}}
{{/if}}
@@ -105,7 +105,7 @@
-
+
{{else}}
NO USERS?!?
{{/if}}
@@ -122,8 +122,8 @@
{{foreach $deleted as $u}}
-
- {{$u.name}}
+
+ {{$u.name}}
{{$u.email}}
{{$u.register_date}}
{{$u.login_date}}
@@ -150,6 +150,6 @@
-
+
diff --git a/view/templates/album_edit.tpl b/view/templates/album_edit.tpl
index 3d1d7573d..72aedd8b7 100644
--- a/view/templates/album_edit.tpl
+++ b/view/templates/album_edit.tpl
@@ -4,12 +4,12 @@
{{$nametext}}
-
+
-
-
+
+
diff --git a/view/templates/apps.tpl b/view/templates/apps.tpl
index 1efd6fdcb..55303b3d7 100644
--- a/view/templates/apps.tpl
+++ b/view/templates/apps.tpl
@@ -3,6 +3,6 @@
{{foreach $apps as $ap}}
- {{$ap}}
+ {{$ap nofilter}}
{{/foreach}}
diff --git a/view/templates/auto_request.tpl b/view/templates/auto_request.tpl
index c7e10482e..ffc7b19d0 100644
--- a/view/templates/auto_request.tpl
+++ b/view/templates/auto_request.tpl
@@ -13,7 +13,7 @@
{{$invite_desc}}
-{{$desc}}
+{{$desc nofilter}}
{{/if}}
@@ -30,18 +30,18 @@
{{if $url}}{{$url_label}} {{$url}} {{/if}}
{{if $location}}{{$location_label}} {{$location}} {{/if}}
{{if $keywords}}{{$keywords_label}} {{$keywords}} {{/if}}
-{{if $about}}{{$about_label}} {{$about}} {{/if}}
+{{if $about}}{{$about_label}} {{$about nofilter}} {{/if}}
{{$your_address}}
{{if $myaddr}}
{{$myaddr}}
-
+
{{else}}
-
+
{{/if}}
{{if $url}}
-
+
{{/if}}
@@ -53,8 +53,8 @@
{{if $submit}}
-
+
{{/if}}
-
+
diff --git a/view/templates/birthdays_reminder.tpl b/view/templates/birthdays_reminder.tpl
index 9261ff8d3..6aa51d470 100644
--- a/view/templates/birthdays_reminder.tpl
+++ b/view/templates/birthdays_reminder.tpl
@@ -1,10 +1,10 @@
{{if $count}}
{{$event_reminders}} ({{$count}})
-{{$event_title|escape}}
+
{{$event_title}}
{{foreach $events as $event}}
-
+
{{/foreach}}
{{/if}}
diff --git a/view/templates/categories_widget.tpl b/view/templates/categories_widget.tpl
index d2cfbe82a..e3cf0fc32 100644
--- a/view/templates/categories_widget.tpl
+++ b/view/templates/categories_widget.tpl
@@ -1,7 +1,7 @@