PHP code is not correctly showed
kenorb - April 29, 2009 - 13:59
| Project: | Code Filter |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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;
}
?>

#1
Interesting bug ;)
Drupal core has no PHP code filter, so I believe this belongs in the code filter project.
#2
Ah, sorry;)