Sanitize math

Formatting input so that an input with text outside `<math>` tags are converted as part of mathml. 
For example, the following string: 
```ruby
"leading <math><msup><mi>a</mi><mn>2</mn></msup></math> trailing"
```
is rendered as: 
![test 12](https://f.cloud.github.com/assets/553687/2449564/3b82b53c-aeb2-11e3-86f4-9d540b8217b7.png)