Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.0.4

Request #5767 relative [url] syntax not supported (e.g. [url=/contact.php])
Submitted: 2005-10-24 14:57 UTC
From: me at ben-xo dot com Assigned: toggg
Status: Closed Package: Text_Wiki_BBCode
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-10-24 14:57 UTC] me at ben-xo dot com
Description: ------------ You already support other "bad" syntaxes such as [url=www...] and [url=ftp...] via a configurationo in BBCode/Url.php. Here's one I use on some of my sites. You would probably want to make it configurable. Test script: --------------- --- Text_Wiki_BBCode-0.0.1/Text/Wiki/Parse/BBCode/Url.php 2005-08-11 11:23:50.000000000 +0100 +++ Text_Wiki_BBCode-0.0.1-benxo/Text/Wiki/Parse/BBCode/Url.php 2005-10-24 15:53:11.000000000 +0100 @@ -98,6 +98,7 @@ foreach ($prefixes as $val) { $url .= '|' . preg_quote($val, '#') . '\.'; } + $url .= '|/'; $host = $this->getConf('host_regexp', $default['host_regexp']); // the full url regexp $url .= ')' . $host . $this->getConf('path_regexp', $default['path_regexp']);

Comments

 [2005-10-25 05:19 UTC] firman
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2005-11-06 07:02 UTC] toggg
This change has been rewriten as it was not BC and potentially dangerous. You need now to set the option relative_enable (default false) to enable relative urls. Only CVS for the moment, will be soon released.