Added checks for incorrect usage of innerHTML. Fixes #1370

(single quotes please)