Don't add # to URL when clicking 'OK' without changing the permalink.

props avryl.
fixes #27594.

git-svn-id: https://develop.svn.wordpress.org/trunk@28771 602fd350-edb4-49c9-b593-d223f7449a82