So ... This is how I solved the problem
- I downloaded and installed the mathtran filter module
- I went to Admin->Modules->Filters->Manage Filters and deactivated the TeX filter and made sure the mathtran and Algebra Notation filters were activated
- You then need to go to the php.ini file on your moodle server, check that the magic_quotes_gpc in on and magic_quotes_runtime and magic_quotes_sybase are off.
- Restart your apache server