修改歌词转义字符

main
amuliang 2023-08-05 09:27:54 +08:00
parent 33bf27327c
commit 7910b35811
1 changed files with 2 additions and 0 deletions

View File

@ -187,11 +187,13 @@
this.messages = []; // 清空消息 this.messages = []; // 清空消息
this.$set(this, 'result', []); this.$set(this, 'result', []);
let result = []; let result = [];
let htmlparser = new DOMParser();
for(let i = 0; i < selected_sources.length; i++) { for(let i = 0; i < selected_sources.length; i++) {
console.log(i); console.log(i);
let list = await this.search(selected_sources[i], keywords, result); let list = await this.search(selected_sources[i], keywords, result);
list.forEach(item => { list.forEach(item => {
item.number = i; //主要用来打标记 item.number = i; //主要用来打标记
item.lrc = item.lrc ? htmlparser.parseFromString(item.lrc, 'text/html').documentElement.textContent : ''; // 防止有转义字符
result.push(item); result.push(item);
}); });
} }