Authored by lijian

Merge branch 'master' of http://git.yoho.cn/fe/yohobuy-portal-fe2 into hotfix-网销保存文本报错

... ... @@ -136,7 +136,16 @@ Controller.prototype.client=function(res,views,model,clientmodel){
if(!model){
model={};
}
ViewModel="<script>var ViewModel="+JSON.stringify(model)+";</script>";
var json_str = JSON.stringify(model);
var cx = /[\u00A0\u2028\u2029\uFEFF]/g;
if (cx.test(json_str)) {
console.log("------------------")
json_str = json_str.replace(cx, function () {
return "";
});
}
ViewModel="<script>var ViewModel="+json_str+";</script>";
var src="";
... ...