Give the gift of Drupal. All merchandise is 50% off through 2016.
This patch disallows the use of the # character in path aliases created by path.module.
Allowing this character in custom paths, while not explicitly disallowed by the relevant RFCs as far as I can tell, can cause ambiguity which is making it difficult to move forward on the issuesand , both of which aim to make it possible to create menu items with anchor fragments in Drupal's standard menu system. In other words, if someone enters a path of "foo#bar," are they referring to the path "foo#bar," or the "bar" anchor on the page at path "foo?" The latter is far more useful and likely, so let's disallow the former and remove the ambiguity.
The patch currently doesn't try to correct any current aliases with a # character in them. I'm not sure if that's a good idea, and if it is, how it should be done.