From 303324cdff3f7c8bc83fae89256a2133939944b2 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 12 Dec 2013 02:15:02 -0800 Subject: more htmlspecialchars sanitisation --- include/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/taxonomy.php') diff --git a/include/taxonomy.php b/include/taxonomy.php index 5159dad02..65d082bb0 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -87,9 +87,9 @@ function format_term_for_display($term) { return $s; if($term['url']) - $s .= '' . htmlspecialchars($term['term']) . ''; + $s .= '' . htmlspecialchars($term['term'], ENT_COMPAT,'UTF-8') . ''; else - $s .= htmlspecialchars($term['term']); + $s .= htmlspecialchars($term['term'], ENT_COMPAT,'UTF-8'); return $s; } -- cgit v1.2.3 From aa312f72bf48f3ffeb62606541b39e5243ce819e Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 20 Dec 2013 12:43:04 -0800 Subject: comanchify mod_directory. Two modules remaining. Actually three because message needs to be split. --- include/taxonomy.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'include/taxonomy.php') diff --git a/include/taxonomy.php b/include/taxonomy.php index 65d082bb0..7887f7687 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -217,16 +217,19 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$ } function dir_tagblock($link,$r) { - $o = ''; - $tab = 0; + $o = ''; + $tab = 0; - if($r) { - $o = '

' . t('Keywords') . '

'; - foreach($r as $rr) { - $o .= ''.$rr['term'].' ' . "\r\n"; + if(! $r) + $r = get_app()->data['directory_keywords']; + + if($r) { + $o = '

' . t('Keywords') . '

'; + foreach($r as $rr) { + $o .= ''.$rr['term'].' ' . "\r\n"; + } + $o .= '
'; } - $o .= '
'; - } return $o; } -- cgit v1.2.3