Dear sharepoint developers,

I am facing a weird issue when updating an item in a custom list.
One filed I have in a list is of type HTML; I have some CSS classes
associated with java script that read certain HTML tags and produce a
tool tip by a mouse over;
the structure of this HTML script is XML-wise as follows:
<snippet>
<a href="#" class="tt">
keyword<div class="ttcontainer">
<span class="tooltip">
<span class="bottom">
<span class="middle">definition</span>
<span class="top"></span>
</span>
</span>
</div>
</a>
</snippet>
My List Item; let's call it 'item' gets updated in a similar way as
follows:
<snippet>
item["field_name"] = "<a href=\"#\" class=\"tt\">keyword<div class=
\"ttcontainer\"><span class=\"tooltip\"><span class=\"bottom\"><span
class=\"middle\">definition</span><span class=\"top\"></span></span></
span></div></a>";
</snippet>
During debug time and before updating, I trace the value and it's as
expected, I confirm that the saved value inside the item["field_name"]
matches exactly the one above; however, after updating:
<snippet>
item.Update();
</snippet>
The value gets changed automatically from sharepoint; my HTML code
above misses two span closing tags and the surrounding double quotes
of the classes are missing as well as follows:
<snippet>
<a href="#" class=tt>
keyword<div class=ttcontainer>
<span class=tooltip>
<span class=bottom>
<span class=middle>definition</span>
<span class=top></span>
</div>
</a>
</snippet>
Concerning the surrounding double quotes, it's not that bad, I can
live without them! but the missing span closing tags! offfff ..., I
had some rough time figuring out how it happens and I had been
reviewing my code for weeks doubting my logic and finally it seemed
that sharepoint changes it from its own!

Any idea on how to fix this? Is this a bug? do I need to pay extra
attention when dealing with fields of HTML type?
I'm puzzled!

Regards