Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在某些情况下无法渲染HTML #349

Open
nicemorning007 opened this issue Jun 12, 2019 · 5 comments
Open

在某些情况下无法渲染HTML #349

nicemorning007 opened this issue Jun 12, 2019 · 5 comments

Comments

@nicemorning007
Copy link

nicemorning007 commented Jun 12, 2019

目前我也无法确定是如何引起的。先附上该页面的代码:
wxss:
/* pages/article/groupon/index.wxss */
@import '../../../utils/wxParse/wxParse.wxss';

.topHeader {
width: 100%;
display: flex;
background-color: #fff;
flex-direction: column;
}

wxml:
<import src="../../../utils/wxParse/wxParse"></import> <view class="goodsInfo"> <template is="wxParse" data="{{wxParseData:article.nodes}}" /> </view>

js:
import WxParse from '../../../utils/wxParse/wxParse'
that.setData({
content
})
WxParse.wxParse('article', 'html', content, that, 5)

在页面中并不展示该组件的内容,使用开发者工具查看wxml发现根本没有生成内容。查看了AppData和网络请求返回的数据,HTML内容是有的。却没有渲染到视图中

@ianzhi
Copy link

ianzhi commented Jun 13, 2019

可以粘一下具体的html内容

@nicemorning007
Copy link
Author

可以粘一下具体的html内容

以下HTML内容在另一个页面是可以正常解析显示的。但是除此之外其他页面均无法显示。
html内容如下:
<p><img class=\"\" src=\"https://img12.360buyimg.com/cms/jfs/t29488/346/1568414027/265452/68fff56e/5ce63d8cN48d88a9c.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img10.360buyimg.com/cms/jfs/t30772/321/1661138764/260993/de485d80/5ce63d8dNcf1792aa.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img11.360buyimg.com/cms/jfs/t1/68249/2/218/358069/5ce63d8dE4f2830a1/e240bd61f42376b3.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img14.360buyimg.com/cms/jfs/t1/81416/40/208/262925/5ce63d8dE2292e4eb/b934151bbea37c19.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img14.360buyimg.com/cms/jfs/t1/40625/2/4976/498924/5ce63d8dEc8df9fc7/2e6e22f8a92affb6.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img10.360buyimg.com/cms/jfs/t30562/315/1618072658/323812/63d25c1c/5ce63d8dN2e37b1ab.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img12.360buyimg.com/cms/jfs/t1/51070/11/696/309834/5ce63d8dE42837747/5eb11ea86a863787.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/><span style=\"color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);\"></span><img class=\"\" src=\"https://img11.360buyimg.com/cms/jfs/t1/49216/26/670/207526/5ce63d8dE30e26eb2/9729694029ac8c28.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle; color: rgb(102, 102, 102); font-family: tahoma, arial, &quot;Microsoft YaHei&quot;, &quot;Hiragino Sans GB&quot;, u5b8bu4f53, sans-serif; font-size: 12px; white-space: normal; background-color: rgb(255, 255, 255);\"/></p>

@ianzhi
Copy link

ianzhi commented Jun 13, 2019

刚试了一下,没发现问题,可能我以前改过这个问题了。
这个仓库我看没人维护,而且好多pr也没有作者回复,所以新放了仓库。
https://github.com/ianzhi/wxparse

@nicemorning007
Copy link
Author

刚试了一下,没发现问题,可能我以前改过这个问题了。
这个仓库我看没人维护,而且好多pr也没有作者回复,所以新放了仓库。
https://github.com/ianzhi/wxparse

好的。晚些时候我用你这个试试。感谢

@SuJunming
Copy link

我遇到一个层级深的时候. 渲染不出来的bug. 很难受.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants