fix inserthtml in ie11. Update #514
add escape string check. Fixes #516
prevent this from finding parent scope. Fixes #517