收藏
回答

部分html标签解析不了

框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 Bug rech-text 微信iOS客户端 Android 微信6.6.6 2.0.2


JS:

var content = res.data.info.content

var content1 = content.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"').replace(/&amp;nbsp;/g, '').replace(/<img src="/g, '<img src="http://www.yuyigufen.com')

console.log(content1)

WxParse.wxParse('article', 'html', content1, that)


HTML:

<import src="../../wxParse/wxParse.wxml" />

<view class="wxParse" style="width:{{width}}px">

<template is="wxParse" data="{{wxParseData:article.nodes}}" />

</view>



回答关注问题邀请回答
收藏

4 个回答

  • 小程序运营专员 - cunjin
    小程序运营专员 - cunjin
    2018-05-07

    麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问题

    2018-05-07
    有用
    回复
  • 小程序运营专员 - cunjin
    小程序运营专员 - cunjin
    2018-05-07

    麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问题

    2018-05-07
    有用
    回复
  • I  do
    I do
    2018-05-07

    wechatide://minicode/chwwqemu6ZZi

    2018-05-07
    有用
    回复 5
    • 黎明
      黎明
      2018-09-20

      请问解决了吗, 遇到同样的问题

      2018-09-20
      回复
    • I  do
      I do
      2018-10-11回复黎明

      没有呢,你们找到方法了吗

      2018-10-11
      回复
    • 黎明
      黎明
      2018-10-11回复I do

      我是修改了一下 插件的代码,然后就可以了。其实文本里面还带着标签,把文本的数据重新正则了一下。但是目前看这么修改一下,没啥问题,不知道会不会带来其他问题


      2018-10-11
      回复
    • I  do
      I do
      2018-10-11

      三克油

      2018-10-11
      回复
    • 黎明
      黎明
      2018-10-11回复I do

      不客气

      2018-10-11
      回复
  • I  do
    I do
    2018-05-07

    html部分代码:

    榜单解读:</strong></p><p style="margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; line-height: 1.8; text-align: start; widows: 1; word-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; color: rgb(193, 0, 0); word-wrap: break-word !important;">一、寡头的布局</strong></p><p style="margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; line-height: 1.8; widows: 1; word-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; color: rgb(193, 0, 0); word-wrap: break-word !important;">


    解析结果:

    2018-05-07
    有用
    回复
登录 后发表内容