aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-13 20:37:52 -0800
committerzotlabs <mike@macgirvin.com>2018-11-13 20:37:52 -0800
commitcfc43f6dea22c4c23ed485a7b321de76515f584d (patch)
tree11bc8dd44a4c33c390996f9190aabd135712add2 /include/text.php
parentee85784be18c14905568fb259411f490c8d6bd91 (diff)
parent1260887fa743a4e5522dea366f0a584430b0a9a0 (diff)
downloadvolse-hubzilla-cfc43f6dea22c4c23ed485a7b321de76515f584d.tar.gz
volse-hubzilla-cfc43f6dea22c4c23ed485a7b321de76515f584d.tar.bz2
volse-hubzilla-cfc43f6dea22c4c23ed485a7b321de76515f584d.zip
Merge branch 'master' into zvi
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index d3130023c..6a6d814d7 100644
--- a/include/text.php
+++ b/include/text.php
@@ -620,6 +620,19 @@ function attribute_contains($attr, $s) {
}
/**
+ * @brief Log to syslog
+ *
+ * @param string $msg Message to log
+ * @param int $priority - compatible with syslog
+ */
+function hz_syslog($msg, $priority = LOG_INFO) {
+ openlog("hz-log", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+ syslog($priority, $msg);
+ closelog();
+}
+
+
+/**
* @brief Logging function for Hubzilla.
*
* Logging output is configured through Hubzilla's system config. The log file
@@ -1048,7 +1061,7 @@ function micropro($contact, $redirect = false, $class = '', $mode = false) {
function search($s,$id='search-box',$url='/search',$save = false) {
return replace_macros(get_markup_template('searchbox.tpl'),array(
- '$s' => $s,
+ '$s' => htmlspecialchars($s),
'$id' => $id,
'$action_url' => z_root() . $url,
'$search_label' => t('Search'),