Issue #3806: Fix html5 compatible problems