filtering the javascripts safe mode for values