Menu

#144 Forward slashes in pattern break wildcard Find

closed
None
2018-12-15
2014-09-25
Brad Konia
No

The wildcard find method "*=" uses preg_match, delimited by forward slashes. Therefore, if you have any forward slashes in your pattern, you need to manually escape them, otherwise the find won't work. This comes up frequently when searching for URL's in href attributes.

I think you should use a different, less common delimiter instead of the forward slash. Also, it would be nice if there was a class property that would allow the user to specify a custom delimiter.

Discussion

  • LogMANOriginal

    LogMANOriginal - 2018-12-15
    • status: open --> closed
    • assigned_to: LogMANOriginal
     
  • LogMANOriginal

    LogMANOriginal - 2018-12-15

    Thanks for reporting this issue!

    It has been fixed in [95a98c]. All forward slashes are properly escaped before doing preg_match, so the delimiter is no issue anymore.

     

    Related

    Commit: [95a98c]


Log in to post a comment.