Good point.  should be preg_match('#^' . quotemeta(home_url()) .'.*\.pdf$#i', $src)