improve param validation action.
remove html5mode as it screws location href.