Thanks for pointing this out, and you must be very right on this — an ampersand in a canonical meta tag URL should be written as an HTML entity (&) inside the HTML attribute.
Not sure why I've put the encoded version of it initially... certainly there was some (wrong) reason for it, but I don't remember which one.
There are only certain types of pages this tag is generated for — the front forums, forums, topics and user profiles. Since user profiles are not indexed by default, it's not critical to have the wrong canonical there; anyway, the fix is quite easy: in the /* Canonical URLs */ block of
bb_functions.php -> load_header(), whenever you find the
%26 code, it should be replaced to
&Except this line:
$canonicalUrl=str_replace('&', '%26', call_user_func('add'.$urlType.'URLPage', $urlp, $GLOBALS['page']));
should be present as:
$canonicalUrl=call_user_func('add'.$urlType.'URLPage', $urlp, $GLOBALS['page']);
I'll fix it in the upcoming new version of miniBB which hopefully could be released in a week or so.