You might have solved this by now. Your HTML code is clearly beyond what the built-in WYSIWYG editor can handle. One way: switch to the raw HTML editing mode (button <>). In that mode, it should save HTML as entered by you. Another way: turn WYSIWYG editor off altogether (in your user settings) before editing this resource.
Resource types
Moodle 1.9 HTML Issue
This discussion has been locked so you can no longer reply to it.