"share" - now the attribut value for the "author" is escaped

This commit is contained in:
Michael Vogel 2012-12-21 02:10:26 +01:00
commit 7c7d3fe5de
5 changed files with 5 additions and 6 deletions

View file

@ -221,7 +221,7 @@ function bb_ShareAttributes($match) {
$author = "";
preg_match("/author='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$author = $matches[1];
$author = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
preg_match('/author="(.*?)"/ism', $attributes, $matches);
if ($matches[1] != "")

View file

@ -1025,7 +1025,7 @@ function diaspora_reshare($importer,$xml,$msg) {
$datarray['owner-link'] = $contact['url'];
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
if (intval(get_config('system','new_share'))) {
$prefix = "[share author='".$person['name'].
$prefix = "[share author='".str_replace("'", "'",$person['name']).
"' profile='".$person['url'].
"' avatar='".((x($person,'thumb')) ? $person['thumb'] : $person['photo']).
"' link='".$orig_url."']";

View file

@ -809,7 +809,7 @@ function get_atom_elements($feed,$item) {
logger('get_atom_elements: fixing sender of repeated message.');
if (intval(get_config('system','new_share'))) {
$prefix = "[share author='".$name.
$prefix = "[share author='".str_replace("'", "'",$name).
"' profile='".$uri.
"' avatar='".$avatar.
"' link='".$orig_uri."']";