Home » Text » Text_Wiki_BBCode » Bug #5767
relative [url] syntax not supported (e.g. [url=/contact.php])
Details
| 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 |
| Roadmaps | (Not assigned) |
Comments
[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']);