Better checking of namespace

We're aiming to get this into release-238 for release tomorrow. This PR is to dev, which will then be cherry-picked into the release branch.

https://wikia-inc.atlassian.net/browse/VE-1397
This is meant to be generic for any usage of contenteditable.