Daniel Dimitrov wrote: Hey teckhardt,
replacing & with & is in my eyes incorrect. In the source code of a page you should use &
mrcoles.com/blog/how-use-amersands-html-encode/
The problem is that the ampersand is being encoded twice. I can confirm that I also had the same problem as teckhardt - the default image was not being picked up because the ampersand was encoded twice in the URL (and thus the characters 'amp;' were being interpreted as part of the parameter name). When I changed line 87 of avatars.php to use an unencoded ampersand, the default image was shown correctly (I didn't investigate at what point the 2nd encoding took place). Note that even if the default image fails, gravatar still sends its own default image (which is an ugly 'G' logo), so you still get an image anyway - just not the one specified.
To reproduce the problem, just install CComment on a fresh Joomla 3.2 site, add some comments using an email address that doesn't have a gravatar, and you will see the image is a 'G', NOT the 'mystery man' image that comes with CComment. If you view the generated source (using the web developer toolbar or something similar), it shows the ampersand is encoded twice (firebug only shows it encoded once - I guess it does a decode first). Changing line 87 of avatars.php to use an unencoded ampersand will cause the correct 'mystery man' image to appear. That might not be the correct solution (it might be better to find out where the 2nd encoding is taking place), but it does work!