added watcher and fixed html_data encode