Added 'noparse' and 'isHTML', apparently necessary for MW 1.21+

Also added a fix for a preg_replace() call that worked before; I don't
know why it stopped working, at least on my server, although I assume
it's related to some PHP update.

Change-Id: I49479cb42fc06bba96d707c8893c49d9bc35663e