Posted by kenorb on April 29, 2009 at 1:59pm
Jump to:
| Project: | Code Filter |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Following code:
function parseUrl ( $url )
{
$r = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?';
$r .= '(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i';
preg_match ( $r, $url, $out );
return $out;
}pasted in php tags, it's not viewed properly, even there is no ending tag.
Example:
<?php
function parseUrl ( $url )
{
$r = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?';
$r .= (?::(d*))?([^#
?>preg_match ( $r, $url, $out );
return $out;
}
?>
Comments
#1
Interesting bug ;)
Drupal core has no PHP code filter, so I believe this belongs in the code filter project.
#2
Ah, sorry;)