Hi,
Are you sure you are using mojoPortal 2.3.4.7? There was never a formal release of that version.
I'm not sure what you're asking but I think you are saying that the link is malformed after saving the HTML content. First, the link you are suggesting that you added is not correct. You can't use the "~/" syntax in HTML. Your link should be "/SharedFiles/Download.aspx?pageid=8&fileid=1294&mid=17" which should work just fine.
HTH,
Joe D.