This is a known issue with the Rich Text editor. The editor assumes that all <a> tags are links to external pages or locations within the course, and tries to correct the formatting when you switch views. The workaround is to make your changes in html, then save without going back to the Preview mode on the editor.
We'll try and get this corrected in the next week and a half or so.