Make WordPress Core


Ignore:
Timestamp:
04/16/2004 02:45:18 AM (20 years ago)
Author:
saxmatt
Message:

Cleaned up regex a little.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/google-hilite.php

    r1082 r1083  
    6666    switch ($engine) {
    6767    case 'google':
    68         if (preg_match('/^http:\/\/w?w?w?\.?google.*/i', $referer)) {
     68        if (preg_match('|^http://(www)?\.?google.*|i', $referer)) {
    6969            return 1;
    7070        }
     
    7272
    7373    case 'lycos':
    74         if (preg_match('/^http:\/\/search\.lycos.*/i', $referer)) {
     74        if (preg_match('|^http://search\.lycos.*|i', $referer)) {
    7575            return 1;
    7676        }
     
    7878
    7979    case 'yahoo':
    80         if (preg_match('/^http:\/\/search\.yahoo.*/i', $referer)) {
     80        if (preg_match('|^http://search\.yahoo.*|i', $referer)) {
    8181            return 1;
    8282        }
Note: See TracChangeset for help on using the changeset viewer.