我正在使用JSON.parse获取产品列表。我运行一个正则表达式来替换被打破了解析字符:html字符串未被解析为JSON.parse
[\n|\t|\r]
看来,我仍然有在以下的内容被复制到HTML的问题。
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, Verdana, Helvetica; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">A soul mate for your aluminum group lounge chair. Rest your weary feet on this matching ottoman - same suspension design, same light weight, same elegant scale as the lounge chair. Polished aluminum 4-star base, black pedestal. Glides.</span></p>
不知道哪个部分破坏了解析器,以及我能做些什么来修复它,而不是删除样式和span标签。
请向我们展示实际的JSON。 – 2009-11-29 23:51:04