Support » Plugin: Highlight Search Terms » Search results found in page with accents are not highlighted

  • When I search for a string without accents, for example “telephone”, the page comes up in the search results, but “téléphone” is not highlighted. Is there any fix for this ?

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author RavanH


    Accents should not be a problem. See for example…

    Can you share a link to your site?


    As you say, accent searches are working. The problem is if I search without accents, words with accents are not highlighted. And yet, the page shows up in WordPress search.

    Sorry, my site is currently in development mode on a local server, however you can see with your example: that également is not highlighted.

    Plugin Author RavanH


    OK I see what you mean. WordPress internal search function returns the post with “également” even on a search for “egalement” without accent but the Hilite Search Terms plugin in turn ignores “également” when highlighting terms on the results page.

    This is an interesting case. Thanks for reporting it.

    I’ll have to look into ways to make the plugin highlight both with AND without accents but it might be more difficult then it sounds…

    Right, that was exactly what I was thinking. In case it could help, I stumbled upon this fiddle:

    Obviously, all of the accent conversions from WordPress, which can be found here: , would need to be added manually.

    If I have time, I’ll see if I can integrate the idea and do a pull request on your GitHub.

    Plugin Author RavanH


    Hey that’s indeed a much more interesting approach than I’ve seen so far. Most cases seem to do some search/replace in the original text instead of adding the accents in the search term(s) as regex.

    If you can find the time to make that work and do a pull request it’ll be highly appreciated 🙂 but if not, this will at least make it to my todo list 😉

    • This reply was modified 2 years, 7 months ago by  RavanH.

    Perfect! For anyone wanting a fix for this, I have started to implement a fix here: It’s not perfect (see the comments), so feel free to modify it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search results found in page with accents are not highlighted’ is closed to new replies.