DataTab.write_state_html: allow foreword HTML
data: fixed bug in raising exception with nds