Need case insensitivity when searching for existing links

bounsy - June 10, 2009 - 19:32
Project:Alinks
Version:6.x-1.0-rc1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Nice module. If I knew how to create a patch, I would, but here's the small change that's needed:

To avoid replacing text in existing links, one line in alinks.module looks like this:
preg_match_all('/\<a\s.*?\>(.*?)\<\/a\>/', $body, $linka);

Please make this case-insensitive, as follows (added the "i" at the end of the regex):
preg_match_all('/\<a\s.*?\>(.*?)\<\/a\>/i', $body, $linka);

That way, links that look like this <A ...>...</A> are also skipped during replacement.

Thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.