encode and decode channel names containing HTML special characters and quotes so they will survive a reshare without mangling

This commit is contained in:
friendica
2013-09-06 05:25:10 -07:00
parent f2f3372aa9
commit d194ee091a
3 changed files with 5 additions and 25 deletions

View File

@@ -21,7 +21,7 @@ function share_init(&$a) {
$pos = strpos($r[0]['body'], "[share");
$o = substr($r[0]['body'], $pos);
} else {
$o = "[share author='".str_replace("'", "'",$r[0]['author']['xchan_name']).
$o = "[share author='".urlencode($r[0]['author']['xchan_name']).
"' profile='".$r[0]['author']['xchan_url'] .
"' avatar='".$r[0]['author']['xchan_photo_s'].
"' link='".$r[0]['plink'].