标签:col https lob str request function bsp 解决 func
thestr=replace(str,chr(13)&chr(10),"") ‘把换行过滤
thestr=replace(thestr," ","") ‘把空格过滤
thestr=replace(thestr,"/include/editor/","https://图片存放服务器/include/editor/") ‘把正文中的图片路径处理成绝对路径以便正常显示
thestr=FormatStr(thestr) ‘把双引号改成单引号
‘================================================
‘将英文双引号变成中文双引号
‘================================================
Function FormatStr(jnkcV)
Dim jnkcTmp,jnkcRegExp
jnkcTmp = jnkcV & ""
Set jnkcRegExp = new RegExp
jnkcRegExp.IgnoreCase = True
jnkcRegExp.Global = True
jnkcRegExp.Pattern = """([^""]*)"""
jnkcTmp = jnkcRegExp.Replace(jnkcTmp,"“$1”")
Set jnkcRegExp = Nothing
FormatStr = jnkcTmp
End Function
至少要处理以上几个细节后才不会报错,我刚学微信小程序,边学边实践小项目,被这个问题卡了好久,通过以上粗糙方法暂且可解决,能正常显示不会报错了。
wx.request得到的正文字段如何处理成符合JSON格式的
标签:col https lob str request function bsp 解决 func
原文地址:https://www.cnblogs.com/zengkun983/p/9734530.html