I migrated a discussion board from SP2013 to SPOnline, but have had users complain about the "Email a link" function sometimes generating broken links. After a bit of testing I found that the issue is due to the pound "#" sign. Older versions of SP seemed to strip out the pound "#" sign from the discussion board url, but SP Online is inconsistent and sometimes seem to remove it and other times keep it. However, the "Email a link" function doesn't encode the pound sign for the url, so the link is broken unless a user replaces the pound sign with "%23".
Is there any way any one knows of to consistently make it so that SharePoint either encodes the pound sign in the url by default, or strips the pound sign from the list item link url?