From dfaf5575047689ebf512d5f0f85cbe5cd9ecf0de Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Fri, 8 Apr 2022 15:32:09 +0800 Subject: [PATCH] fix: rich-text parse img src --- packages/uni-components/src/components/rich-text/html-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uni-components/src/components/rich-text/html-parser.js b/packages/uni-components/src/components/rich-text/html-parser.js index 2177425b8..efc1f926f 100644 --- a/packages/uni-components/src/components/rich-text/html-parser.js +++ b/packages/uni-components/src/components/rich-text/html-parser.js @@ -12,7 +12,7 @@ function parseAttrs(attrs) { let value = attr.value const name = attr.name - if (value.match(/ /) && name !== 'style') { + if (value.match(/ /) && ['style', 'src'].indexOf(name) === -1) { value = value.split(' ') } -- GitLab