A: 

You must be using Internet Explorer, which is the only browser I can think of that doesn't close list-item tags in a content-editable section. Also, the tags ought to be lower case, which is the other give-away.

It is worth checking that you are sending the correct document-type to the browser as this may solve your problem (i.e. make sure the editable bit is definitely an XHTML page). Other than this, you could manage it by having a plain-text editable area with some custom(ish) mark-up and a preview area below. Erm... a bit like Stack Overflow. That way, you can create the exact mark-up you want, rather than relying on what a browser generates.

Sohnee
A: 

Try this. http://tidy.sourceforge.net/

Michas