improve performance
fix url escaped regex error