From 621e737826262d0221d6fcac19713df0e3195045 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 3 Aug 2012 18:33:11 -0700 Subject: [PATCH] fix angle char storage and transmission, rev update --- boot.php | 2 +- include/items.php | 4 ++-- include/network.php | 4 ++++ mod/item.php | 3 +++ util/messages.po | 4 ++-- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index f7d38c2551..25f89abf49 100644 --- a/boot.php +++ b/boot.php @@ -11,7 +11,7 @@ require_once('include/cache.php'); require_once('library/Mobile_Detect/Mobile_Detect.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1423' ); +define ( 'FRIENDICA_VERSION', '3.0.1424' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1154 ); diff --git a/include/items.php b/include/items.php index 701a7ada7e..40b2c14b45 100755 --- a/include/items.php +++ b/include/items.php @@ -533,7 +533,7 @@ function get_atom_elements($feed,$item) { $res['body'] = $rawenv[0]['data']; $res['body'] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$res['body']); // make sure nobody is trying to sneak some html tags by us - $res['body'] = notags(base64url_decode($res['body'])); + $res['body'] = htmlspecialchars(base64url_decode($res['body']),ENT_QUOTES,'UTF-8'); } @@ -578,6 +578,7 @@ function get_atom_elements($feed,$item) { $res['body'] = escape_tags($res['body']); } + // this tag is obsolete but we keep it for really old sites $allow = $item->get_item_tags(NAMESPACE_DFRN,'comment-allow'); @@ -3328,7 +3329,6 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { else $body = $item['body']; - $o = "\r\n\r\n\r\n"; if(is_array($author)) diff --git a/include/network.php b/include/network.php index 0fff5c7cc9..0e1a63792f 100644 --- a/include/network.php +++ b/include/network.php @@ -854,6 +854,10 @@ function scale_external_images($s, $include_link = true, $scale_replace = false) } } } + + // replace the special char encoding + + $s = htmlspecialchars($s,ENT_QUOTES,'UTF-8'); return $s; } diff --git a/mod/item.php b/mod/item.php index fddc3fd124..436adec50a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -438,6 +438,7 @@ function item_post(&$a) { $body = bb_translate_video($body); + /** * Fold multi-line [code] sequences */ @@ -446,6 +447,8 @@ function item_post(&$a) { $body = scale_external_images($body,false); + + /** * Look for any tags and linkify them */ diff --git a/util/messages.po b/util/messages.po index 86bf30b508..e9affd4dc9 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 3.0.1423\n" +"Project-Id-Version: 3.0.1424\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-02 10:00-0700\n" +"POT-Creation-Date: 2012-08-03 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- 2.39.5