Added checks for incorrect usage of innerHTML. Fixes #1370

Ok, thanks, fixed in latest version to be posted momentarily.  Incidentally, do you know Alan Pierce?  Tell him Jim from Palantir says Hi!