JSON.parse(
nodes
.replace(/\n/g, '\\n')
.replace(/(<[^>]*")/g, (match: any)=> match.replace(/"/g, '\\"'))
)
将包含html标签的json字符串转为json
最新推荐文章于 2024-05-13 17:49:28 发布
JSON.parse(
nodes
.replace(/\n/g, '\\n')
.replace(/(<[^>]*")/g, (match: any)=> match.replace(/"/g, '\\"'))
)