Javascript fetch keep adding iframe url into the fetched url

Viewed 30

So im trying to fetch from a blob, but everytime i do, it always add iframe url in it.

fetch(regex2)
            .then(response => response.blob())
            .then(blob => {
                const reader = new FileReader()
                reader.readAsDataURL(blob)
                reader.onloadend = () => {
                    const base64data = question + ' ' + reader.result;
                    const imageHash = base64data.hashCode()
                    const answer = dict[imageHash]
                    console.log(imageHash)
                    if (answer === undefined) {
                        console.log("idk")
                        didntKnow = true
                    } else {
                        console.log(answer)
                    }
                }
            })
            .catch(err => console.log(err))
        }

Its fetching https://phoenix.jklm.fun/games/popsauce/url(%22blob:https://phoenix.jklm.fun/6da11582-c0ea-4767-9857-39079c010fde%22) which adding iframe url on it

Expected fetch blob:https://phoenix.jklm.fun/6da11582-c0ea-4767-9857-39079c010fde

I already made sure the passed url is cleaned and it just keep adding the iframe url for some reason...

Another example

        fetch("example.com")
            .then(r => r.blob())
            .then(b => {
                const reader = new FileReader()
                reader.readAsDataURL(b)
                reader.onloadend = () => {
                    const base64data = question + ' ' + reader.result;
                    const imageHash = base64data.hashCode()
                    const answer = dict[imageHash]
                    console.log(imageHash)
                    if (answer === undefined) {
                        console.log("idk")
                        didntKnow = true
                    } else {
                        console.log(answer)
                    }
                }
            })
            .catch(err => console.log(err))
        }

Its fetching https://phoenix.jklm.fun/games/popsauce/example.com which adding iframe url on it

Expected fetch example.com

0 Answers
Related