note 27780 deleted from function.preg-replace by sniper
| From: | sniper@php.net | Date: | Sun, 07 Sep 2003 22:04:00 +0000 |
| Subject: | note 27780 deleted from function.preg-replace by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55692@lists.php.net to get a copy of this message | ||
Note Submitter: seanNOSPAM at vine NOSPACE press DOT com
----
Be aware that these "activate links" expressions (I haven't tried them all) tend to
mangle fully formed hyperlinks. I.e., a user nicely hotlinks a word w/ a href= and you come through
w/ a function to activate links and pow, the link is all garbled (although it should still work).
I think the best solution would be to activate all links that aren't immediately preceded w/ a
quote, but I'm not good w/ regex, so for now I'm taking the opposite approach:
Require some kind of trigger for the activate link function. E.g., rather than look for http, www,
etc., look for ~http, ~www, or some such thing. I haven't thought through what the best
character might be.