Skip to content

Commit b12dcc9

Browse files
committed
update xmldom to 0.9.8
1 parent 18fa485 commit b12dcc9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"@nuxt/kit": "^3.0.0",
29-
"@xmldom/xmldom": "^0.8.7",
29+
"@xmldom/xmldom": "^0.9.8",
3030
"csvtojson": "^2.0.10",
3131
"destr": "^1.2.2",
3232
"fuzzysort": "^2.0.4",

src/builder/parsers/markdown/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const isHtmlTag = tag => htmlTags.includes(tag) || voidHtmlTags.includes(tag)
1010

1111
const htmlToText = html => {
1212
const dom = new DOMParser()
13-
const doc = dom.parseFromString(`<!DOCTYPE html><html><body>${html}</body></html>`)
13+
const doc = dom.parseFromString(`<!DOCTYPE html><html><body>${html}</body></html>`, 'text/html')
1414

1515
return nodeToText(doc.documentElement)
1616
}
@@ -34,7 +34,7 @@ const nodeToText = (node) => {
3434

3535
const htmlToVnode = html => {
3636
const dom = new DOMParser()
37-
const doc = dom.parseFromString(`<!DOCTYPE html><html><body>${html}</body></html>`)
37+
const doc = dom.parseFromString(`<!DOCTYPE html><html><body>${html}</body></html>`, 'text/html')
3838

3939
const env = { tags: [] }
4040
const arr = nodeToVnode(doc.documentElement, env)

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,10 +866,10 @@
866866
"@unhead/ssr" "^1.0.9"
867867
"@unhead/vue" "^1.0.9"
868868

869-
"@xmldom/xmldom@^0.8.7":
870-
version "0.8.7"
871-
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.7.tgz#8b1e39c547013941974d83ad5e9cf5042071a9a0"
872-
integrity sha512-sI1Ly2cODlWStkINzqGrZ8K6n+MTSbAeQnAipGyL+KZCXuHaRlj2gyyy8B/9MvsFFqN7XHryQnB2QwhzvJXovg==
869+
"@xmldom/xmldom@^0.9.8":
870+
version "0.9.8"
871+
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.9.8.tgz#1471e82bdff9e8f20ee8bbe60d4ffa8a516e78d8"
872+
integrity sha512-p96FSY54r+WJ50FIOsCOjyj/wavs8921hG5+kVMmZgKcvIKxMXHTrjNJvRgWa/zuX3B6t2lijLNFaOyuxUH+2A==
873873

874874
"@zhead/schema@^1.0.7":
875875
version "1.0.7"

0 commit comments

Comments
 (0)