I'm using axios to fetch some informations from a website, and the HTML code came all with uppercase tags like
, and so on. I'm getting a bunch of problems to get elements with querySelector, so I tryied to configure the parsing option , setting lowerCaseTagName to true.
But for some reason it removes a lot of the code like, script tags, body tags, also removes the head tag, but preserve it content.
I solved the problem converting the axios response to lowercase, and then passing it to parse() function, this way, querySelector worked great.
I'm using axios to fetch some informations from a website, and the HTML code came all with uppercase tags like
But for some reason it removes a lot of the code like, script tags, body tags, also removes the head tag, but preserve it content.
I solved the problem converting the axios response to lowercase, and then passing it to parse() function, this way, querySelector worked great.
The problematic HTML code is right down, if it helps. https://pastebin.com/raw/H6Vzwpe9