Index: trunk/phase3/includes/Parser.php |
— | — | @@ -1207,6 +1207,19 @@ |
1208 | 1208 | $url = $protocol . $m[1]; |
1209 | 1209 | $trail = $m[2]; |
1210 | 1210 | |
| 1211 | + # special case: handle urls as url args: |
| 1212 | + # http://www.example.com/foo?=http://www.example.com/bar |
| 1213 | + if(strlen($trail) == 0 && |
| 1214 | + isset($bits[$i]) && |
| 1215 | + preg_match('/^'. wfUrlProtocols() . '$/S', $bits[$i]) && |
| 1216 | + preg_match( '/^('.EXT_LINK_URL_CLASS.'+)(.*)$/s', $bits[$i + 1], $m )) |
| 1217 | + { |
| 1218 | + # add protocol, arg |
| 1219 | + $url .= $bits[$i] . $bits[$i + 1]; # protocol, url as arg to previous link |
| 1220 | + $i += 2; |
| 1221 | + $trail = $m[2]; |
| 1222 | + } |
| 1223 | + |
1211 | 1224 | # The characters '<' and '>' (which were escaped by |
1212 | 1225 | # removeHTMLtags()) should not be included in |
1213 | 1226 | # URLs, per RFC 2396. |