You need to use CDATA tags to handle the '<' and '>' symbols all throughout your script. They are not allowed in a script tag embedded in an xhtml tag. Alternatively, extract that script into its own javascript .js file, add it to the ebook and use a link tag to pull it in.
For example, the "<t.length;" is being treated like it is the start of a tag and the ; as an attribute.
Where on earth did you get this pile of crap from? It looks like a bad html website pulled into a book. The rules of parsing xhtml are much stricter than those used in html where that crap may fly.
So either wrap your javascript entirely in a CDATA tag or move it out into its own .js file.
Last edited by KevinH; 12-09-2020 at 07:03 PM.
|