js encode external provided view model data