Skip audio, video tag in combine translation feature (#589)
# PR Checklist - [ ] Did you check if it works normally in all models? *ignore this when it dosen't uses models* - [ ] Did you check if it works normally in all of web, local and node hosted versions? if it dosen't, did you blocked it in those versions? - [ ] Did you added a type def? # Description I'm sorry to repeat it so many times, but I think this is really the last time
This commit is contained in:
@@ -371,7 +371,7 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
|
||||
node instanceof HTMLElement
|
||||
) {
|
||||
const children = Array.from(node.childNodes);
|
||||
const blacklist = ["img", "iframe", "script", "style", "div", "button"];
|
||||
const blacklist = ["img", "iframe", "script", "style", "div", "button", "audio", "video"];
|
||||
const hasBlacklistChild = children.some((child) =>
|
||||
blacklist.includes(child.nodeName.toLowerCase())
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user