Change pager href attribute I'm new to Drupal and I've a 'pager' link that shows the second page of a block. It's href attribute is set to something like this '?page=0%2C1' I want it to be simply '#'.
It worked by setting $attributes['href'] to '#' in pager.inc but I'm not sure if I'm supposed to modify this file or not.
I think we've covered why this might not be a good idea in comments, but to change the output of the pager you just need to override theme_pager_link() in your site's theme.

You'll need to reproduce the original function almost exactly, except you'll probably want to ditch the use of pager_get_query_parameters(), and alter the url() on the penultimate line to use a fragment.