I've found this bug on Polylang. I'm sure is Polylang because I've disabled every plugin but Polylang, and activated the twentyeleven theme, and the bug remains. I've disabled Polylang, and the bug disappears.
If you create a new post (custom) and try to have a preview clicking on the "preview" button, the generated url has an entity where the ampersand (& = #038;) should appear:
since the ampersand precedes the "p" post ID parameter in the URL.
This happens when the post is in draft mode, so the url/slug has not been created yet (and WordPress generates the url in the above way). The only workaround is making the post public, but not always is a viable way.
The strange thing is that it happens on custom post types, while in standard post it doesn't happen.