Javascript error with UTF-8 (Arabic) search
-
The on-page search works perfectly on English pages on the sites I manage; however, on Arabic pages it fails with the following console error:
codepeople_shearch_in_place.min.js?ver=1.1.4:25 Uncaught DOMException: Failed to execute 'splitText' on 'Text': The offset 169 is larger than the Text node's length.
Generally speaking, it gives this error for words greater than 2 characters with varying offset values. Longer words will work if they only appear once on the page. For example:
- This works: ?? ?? (two words of 2 characters)
- But this does not: ??? (3 letters)
- However, this does: ?????? (appears once)
Example pages:
https://hcp.adhd.org.sa/ar/??????-??????-??????-????????-??-????/
https://cpg.adhd.org.sa/ar/????????/
Thanks!
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Javascript error with UTF-8 (Arabic) search’ is closed to new replies.