diff options
author | redmatrix <git@macgirvin.com> | 2016-06-04 15:04:14 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-04 15:04:14 -0700 |
commit | 2c7ce20ccf9bb71a67ba24d238fd6a7361320b3e (patch) | |
tree | 3d2016d983b0e230594a1a8681b5d438d8f71a5f /include/items.php | |
parent | b84f7cd37fdad61e04878580645cab8c53c666f4 (diff) | |
download | volse-hubzilla-2c7ce20ccf9bb71a67ba24d238fd6a7361320b3e.tar.gz volse-hubzilla-2c7ce20ccf9bb71a67ba24d238fd6a7361320b3e.tar.bz2 volse-hubzilla-2c7ce20ccf9bb71a67ba24d238fd6a7361320b3e.zip |
cross-site encoding issue with tags
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php index f473b2bac..3b73310fe 100755 --- a/include/items.php +++ b/include/items.php @@ -1183,7 +1183,7 @@ function encode_item_terms($terms,$mirror = false) { if($terms) { foreach($terms as $term) { if(in_array($term['ttype'],$allowed_export_terms)) - $ret[] = array('tag' => $term['term'], 'url' => $term['url'], 'ttype' => termtype($term['type'])); + $ret[] = array('tag' => $term['term'], 'url' => $term['url'], 'type' => termtype($term['type'])); } } @@ -1240,11 +1240,9 @@ function decode_tags($t) { $ret = array(); foreach($t as $x) { $tag = array(); - if(array_key_exists('type',$x)) - $x['ttype'] = $x['type']; $tag['term'] = htmlspecialchars($x['tag'], ENT_COMPAT, 'UTF-8', false); $tag['url'] = htmlspecialchars($x['url'], ENT_COMPAT, 'UTF-8', false); - switch($x['ttype']) { + switch($x['type']) { case 'hashtag': $tag['ttype'] = TERM_HASHTAG; break; |