From d7ee552c570f4fca760c3d1573f32c005cf73bb8 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 20 Nov 2013 15:20:12 -0800 Subject: Protocol: now set data['alg'] on all encapsulated encrypted packets, so that we can more easily retire 'aes256cbc' once it is no longer viable. --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index fc70e3509..780992f4a 100755 --- a/include/text.php +++ b/include/text.php @@ -1010,9 +1010,9 @@ function unobscure(&$item) { if(array_key_exists('item_flags',$item) && ($item['item_flags'] & ITEM_OBSCURED)) { $key = get_config('system','prvkey'); if($item['title']) - $item['title'] = aes_unencapsulate(json_decode_plus($item['title']),$key); + $item['title'] = crypto_unencapsulate(json_decode_plus($item['title']),$key); if($item['body']) - $item['body'] = aes_unencapsulate(json_decode_plus($item['body']),$key); + $item['body'] = crypto_unencapsulate(json_decode_plus($item['body']),$key); } } -- cgit v1.2.3 From 8619fc368d24fa903c543561428709452b08c5a7 Mon Sep 17 00:00:00 2001 From: tuscanhobbit Date: Fri, 22 Nov 2013 22:45:16 +0100 Subject: updated logo in readme and r# shorthand --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 780992f4a..54626a772 100755 --- a/include/text.php +++ b/include/text.php @@ -916,8 +916,8 @@ function smilies($s, $sample = false) { ':facepalm', ':like', ':dislike', - 'red# the Red Matrix', - 'r# the Red Matrix', + 'redred#matrix', + 'redr#matrix', '~friendica ~friendica' ); -- cgit v1.2.3 From d1ab865ccf8a9200236e310c93ad56b8a7f93aad Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Nov 2013 19:17:20 -0800 Subject: make the template processor (e.g. replace_macros) pluggable --- include/text.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 54626a772..3d15a5c6b 100755 --- a/include/text.php +++ b/include/text.php @@ -15,8 +15,11 @@ require_once("include/friendica_smarty.php"); function replace_macros($s,$r) { $a = get_app(); + $arr = array('template' => $s, 'params' => $r); + call_hooks('replace_macros', $arr); + $t = $a->template_engine(); - $output = $t->replace_macros($s,$r); + $output = $t->replace_macros($arr['template'],$arr['params']); return $output; } -- cgit v1.2.3 From d9f67876dce5da9ed056726f792e087d142699cb Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 2 Dec 2013 15:15:02 -0800 Subject: refactor magic-auth --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 3d15a5c6b..ff695062f 100755 --- a/include/text.php +++ b/include/text.php @@ -1084,7 +1084,7 @@ function format_categories(&$item,$writeable) { if(! trim($term)) continue; $removelink = (($writeable) ? z_root() . '/filerm/' . $item['id'] . '?f=&cat=' . urlencode($t['term']) : ''); - $categories[] = array('term' => $term, 'writeable' => $writeable, 'removelink' => $removelink, 'url' => $t['url']); + $categories[] = array('term' => $term, 'writeable' => $writeable, 'removelink' => $removelink, 'url' => zid($t['url'])); } } $s = replace_macros(get_markup_template('item_categories.tpl'),array( -- cgit v1.2.3 From 04f61dd4a1e2d44291265855df68521933bedb04 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Dec 2013 21:10:03 -0800 Subject: add icon_trnalsate --- include/text.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index ff695062f..bd4376ce4 100755 --- a/include/text.php +++ b/include/text.php @@ -128,6 +128,9 @@ function purify_html($s) { } + + + // generate a string that's random, but usually pronounceable. // used to generate initial passwords -- cgit v1.2.3 From 75ebf06131e935795b7072acc012c9e37669eade Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 9 Dec 2013 14:05:52 -0800 Subject: some work on modularising the default profile photo so we can make them site selectable. Also red != friendica so we don't need all these friendica logos taking up space --- include/text.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index bd4376ce4..9254508a4 100755 --- a/include/text.php +++ b/include/text.php @@ -884,9 +884,7 @@ function smilies($s, $sample = false) { ':like', ':dislike', 'red#', - 'r#', - '~friendica' - + 'r#' ); $icons = array( @@ -923,8 +921,8 @@ function smilies($s, $sample = false) { ':like', ':dislike', 'redred#matrix', - 'redr#matrix', - '~friendica ~friendica' + 'redr#matrix' + ); $params = array('texts' => $texts, 'icons' => $icons, 'string' => $s); -- cgit v1.2.3 From 76d8501d671ae7d4234f1a905cd0e506c7f9b23e Mon Sep 17 00:00:00 2001 From: marijus Date: Tue, 10 Dec 2013 00:32:49 +0100 Subject: saved search icon work and bugfixes for #tags not beeing deletable and save button showing if saved search is disabled --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 9254508a4..f425690ba 100755 --- a/include/text.php +++ b/include/text.php @@ -734,7 +734,7 @@ function search($s,$id='search-box',$url='/search',$save = false) { $o .= '
'; $o .= ''; $o .= ''; - if($save) + if(feature_enabled(local_user(),'savedsearch')) $o .= ''; $o .= '
'; return $o; -- cgit v1.2.3 From ed9f10872240231125007cf32b95007281558cac Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 9 Dec 2013 21:20:55 -0800 Subject: comanchify the savedsearch widget --- include/text.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index f425690ba..aa23f96b0 100755 --- a/include/text.php +++ b/include/text.php @@ -741,6 +741,20 @@ function search($s,$id='search-box',$url='/search',$save = false) { } +function searchbox($s,$id='search-box',$url='/search',$save = false) { + $a = get_app(); + $o = '
'; + $o .= '
'; + $o .= ''; + $o .= ''; + $o .= ''; + if(feature_enabled(local_user(),'savedsearch')) + $o .= ''; + $o .= '
'; + return $o; +} + + function valid_email($x){ if(get_config('system','disable_email_validation')) -- cgit v1.2.3 From b3fe221b7fe9c6ecc151d9c00f36d3913526f6a3 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 11 Dec 2013 23:13:36 -0800 Subject: issue #240 - we were using htmlentities instead of htmlspecialchars in several places, and this was a bit greedy in the set of characters which were converted from utf-8 to HTML entities. Also brought mail attachments up to date so they are rendered identically to item attachments. --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index aa23f96b0..042a972d1 100755 --- a/include/text.php +++ b/include/text.php @@ -1065,7 +1065,7 @@ function theme_attachments(&$item) { break; } - $title = htmlentities($r['title'], ENT_COMPAT,'UTF-8'); + $title = htmlspecialchars($r['title'], ENT_COMPAT,'UTF-8'); if(! $title) $title = t('unknown.???'); $title .= ' ' . $r['length'] . ' ' . t('bytes'); -- cgit v1.2.3 From 94975f8d3081051df48b6fdd73be3f4be5484cf6 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 13 Dec 2013 12:30:44 -0800 Subject: categories should already be html encoded - ensure this is the case but don't double encode --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 042a972d1..f808fb0a0 100755 --- a/include/text.php +++ b/include/text.php @@ -1095,7 +1095,7 @@ function format_categories(&$item,$writeable) { if($terms) { $categories = array(); foreach($terms as $t) { - $term = htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8') ; + $term = htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8',false) ; if(! trim($term)) continue; $removelink = (($writeable) ? z_root() . '/filerm/' . $item['id'] . '?f=&cat=' . urlencode($t['term']) : ''); @@ -1117,7 +1117,7 @@ function format_filer(&$item) { if($terms) { $categories = array(); foreach($terms as $t) { - $term = htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8') ; + $term = htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8',false) ; if(! trim($term)) continue; $removelink = z_root() . '/filerm/' . $item['id'] . '?f=&term=' . urlencode($t['term']); -- cgit v1.2.3