Bug open ticket 8205 fix for console error when editing HTML pages

Pull request to resolve ticket 8205