When tagging an image, if the user name contains an apostrophe or a quotation mark it will break the link in the list of friends and you cannot tag that user in any photos. To fix this change mod/tidypics/views/default/tidypic/tagging.php (starting at line 39) to:
if ($viewer) {
$people_list = tp_get_tag_list($viewer);
$content = "<div id='tidypics_tagmenu_left'>";
$content .= "<input type='hidden' name='image_guid' value='{$image->guid}' />";
$content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
$content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
$content .= "<input type='hidden' name='word' id='word' value='' />";
$content .= "<ul id='tidypics_phototag_list'>";
$content .= "<li><a href=\"javascript:void(0)\" onclick=\"selectUser("
. "{$viewer->getGUID()},'" . addslashes($viewer->name)
. "')\"> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
if ($people_list) {
foreach($people_list as $friend_guid => $friend_name) {
$content .= "<li><a href=\"javascript:void(0)\""
. " onclick=\"selectUser({$friend_guid}, '" .
addslashes($friend_name) .
"')\">{$friend_name}</a></li>\n";
}
}
and mod/tidypics/views/default/tidypic/js/tagging.php (starting at line 123) to:
function selectUser(id, name)
{
user_id = id;
name = unescape(name);
$("input.input-filter").val(name);
}
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Shouvik Mukherjee@shouvik
Shouvik Mukherjee - 0 likes
You must log in to post replies.Thanks!