Title: google-hilite bugs
Last modified: August 18, 2016

---

# google-hilite bugs

 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/google-hilite-bugs/)
 * I don’t have a word press installation, I’ve just observed this in live use. 
   Sometimes the google-hilite plugin completely obliterates the text, replacing
   it with PHP error messages like this one:
    Warning: Unknown modifier ‘/’ in /
   homepages/36/d91638709/htdocs/scp/wp-content/plugins/google-hilite.php on line
   107 Warning: Unknown modifier ‘\’ in /homepages/36/d91638709/htdocs/scp/wp-content/
   plugins/google-hilite.php on line 105 Looking at the source, it is on those lines
   that the actual highlighting action is occuring. I got those errors by entering“
   string can phone” into google and hitting “I’m feeling lucky”. I’ve seen very
   similar messages for search terms that include forward slashes in them. The slashes
   get used unescaped in the search terms, which get passed to the preg_replace()
   function. I don’t exactly know what gets put in $term with the lucky search. 
   I don’t think the “perl compatible” regular expressions are 100% perl compatable,
   or else you might be able to run code with a well formed search term. I can’t
   get the textism google hilite to do anything (the wp version says it is based
   on it), so I don’t know if the bug is new or just passed on.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [monkeynotes](https://wordpress.org/support/users/monkeynotes/)
 * (@monkeynotes)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91071)
 * <bump>
    I am getting this error on some google search strings: `Warning: Unknown
   modifier 'r' in /home/public_html/plastic/wp-content/plugins/google-hilite.php
   on line 107` The search that produced this was “pictures of trash/rubbish” I 
   expect the “/” and its immediate proximity to the “r” is the problem.
 *  [Ryan Boren](https://wordpress.org/support/users/ryan/)
 * (@ryan)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91072)
 * [This patch](http://cvs.sourceforge.net/viewcvs.py/cafelog/wordpress/wp-content/plugins/google-hilite.php?r1=1.5&r2=1.6)
   will fix it.
 *  [monkeynotes](https://wordpress.org/support/users/monkeynotes/)
 * (@monkeynotes)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91074)
 * Thanks rboren
 *  [AuntiAlias](https://wordpress.org/support/users/auntialias/)
 * (@auntialias)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91101)
 * [@ryan](https://wordpress.org/support/users/ryan/)…
 * Thanks for the note about the patch. I just upgraded to WP 1.5 and what with 
   one thing and another, got that error on line 105 mentioned in this thread. That
   and google got me to this discussion thread.
 * I looked at my copy of google-highlight.php file and it’s version 1.2 of the 
   plugin, whereas the code you linked to was the difference between 1.5 and 1.6.
 * I’m off to go find a fresh, clean copy of the latest version. (Just checked, 
   and google-highlight isn’t included with WP 1.5)
 * Oh wait a second. I just found [this at the plugins site](http://dev.wp-plugins.org/changeset/204),
   downloaded the file from the filelink google-highlight/trunk/google-highlight.
   php, and that’s version **1.2**, too. (not 1.5 or 1.6 as previously mentioned
   in previous link) I did a find differences between that and the 1.2 that I already
   have, and BBEdit found 6 places where they differ from one another.
 * So, should I replace my version 1.2 with the version 1.2 contained in link I 
   just mentioned?
 *  [AuntiAlias](https://wordpress.org/support/users/auntialias/)
 * (@auntialias)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91103)
 * !bump!
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91104)
 * Yes, use the v1.2 (rev204) copy.
 *  [AuntiAlias](https://wordpress.org/support/users/auntialias/)
 * (@auntialias)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91105)
 * Thanks. ::Thwaps communicator button:: On my way!
 *  [premasagar](https://wordpress.org/support/users/premasagar/)
 * (@premasagar)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91107)
 * Hmm, I seem to be having different problems to the ones mentioned.
 * Firstly, I needed to add:
    `add_filter('the_excerpt', 'hilite');` to the end 
   of the script, as I did for other plugins, because it was not being activated
   on the main search page – just when viewing a single post.
 * But the problem I still have is that no search terms are highlighted when I first
   search for a word. When I repeat the same search, the words are highlighted as
   expected. Weird!
 * Using WordPress 1.5
 * Any ideas?
 *  [premasagar](https://wordpress.org/support/users/premasagar/)
 * (@premasagar)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91108)
 * ahem… *bump*

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘google-hilite bugs’ is closed to new replies.

 * 9 replies
 * 6 participants
 * Last reply from: [premasagar](https://wordpress.org/support/users/premasagar/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/google-hilite-bugs/#post-91108)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
