The problem is as follows:
I added a page as a resource. In the page content editor, I pasted some mathml code using html source editor. It was embeded and displayed correctly.
Now while adding a question, I again used the html source editor and pasted the same mathml code. But this time the editor striped off all the mark-ups and only dispayed the text.