Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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: '
Comment | File | Size | Author |
---|---|---|---|
#3 | avatar_selection_quotes1.patch | 736 bytes | jazzitup |
Comments
Comment #1
jazzitup CreditAttribution: jazzitup commentedOops, 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
.Comment #2
jazzitup CreditAttribution: jazzitup commentedThe 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:
http://drupal.org/node/25511
http://drupal.org/node/119741
Comment #3
jazzitup CreditAttribution: jazzitup commentedHere's the patch as described from above.
Comment #4
stella CreditAttribution: stella commentedCommitted, thanks. It'll be included in the next dev release.
Cheers,
Stella
Comment #6
stella CreditAttribution: stella commentedReleased in 6.x-1.6 and 5.x-2.8.