Fixed bug with encoding.
Added form submit on js.