Browse Source

处理快照页标题html标签

wangshan 7 years ago
parent
commit
44ad85f78a

+ 2 - 0
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -783,6 +783,8 @@ function execShare(thisIndex){
 	content += "向您推荐了剑鱼招标订阅";
 	var link = "{{Msg "seo" "ZBADDRESS"}}/swordfish/about?source=app_infocontentshare";
 	var shareTitle = {{.T.obj.title}};
+	shareTitle=shareTitle.replace(/<\/?.+?>/g,"");
+ 	shareTitle=shareTitle.replace(/ /g,"");
 	if(shareType == 1){
 		link = window.location.href.replace("/jyapp/","/");
 		if(link.indexOf("?") == -1){

+ 2 - 0
src/web/staticres/wxswordfish/share.js

@@ -65,6 +65,8 @@ function initShare(signature,openid,isentry,activecode,nickname,avatar,id){
 				desc = titleTemp;
 				otherDesc = otherTitleTemp;
 				title = $(".info .title").text();
+				title=title.replace(/<\/?.+?>/g,"");
+			 	title=title.replace(/ /g,"");
 				link = window.location.href;
 				if(encryptid != ""){
 					link = subhref;