When I have a selection of avatars which use more than one page, at the bottom of the last avatar there is a pagination which works perfectly in IE6 browser, but my FF3 doesn't let me see different pages of avatars.

For example, when I click on NEXT, nothing happens. When I opened the HTML source, I've seen exactly this:
onclick="return fetchPage('form#user-edit', 'div.user_avatar_select', '/user/1/edit', 1, '/sites/all/modules/avatar_selection/js/avatar_selection.js');"

Single quotes were replaced by the HTML substitutes: &#039

#3 avatar_selection_quotes1.patch736 bytesjazzitup
Members fund testing for the Drupal project. Drupal Association Learn more


jazzitup’s picture

Oops, I've expected that CODE tag would show exactly what I wanted to, but I'll describe the issue from above: inside of the fetchPage() Javascript function call, there were no single quotes, but instead there were all HTML substitutes &#039.

jazzitup’s picture

Status: Needs review » Fixed

The cause of this issue is how Drupal handles link attributes. It processes them through a check_plain() function which contains:
return drupal_validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';
So, all you have to do is to remove single quotes from your module (line 1283) and you'll be fine:
$onclick = "return fetchPage($form_id, $dom_identifier, $url, ". $page .", $js_file);";

It's a very old issue which is still not resolved:

jazzitup’s picture

Status: Active » Needs review
736 bytes

Here's the patch as described from above.

stella’s picture

Committed, thanks. It'll be included in the next dev release.


Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

stella’s picture

Released in 6.x-1.6 and 5.x-2.8.