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
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*))?([^#
?>
+)?(?:\?([^#]+))?(?:#(.+$))?!i';

preg_match ( $r, $url, $out );

return $out;
}
?>

#1

Damien Tournoud - April 29, 2009 - 14:09
Project:Drupal» Code Filter
Version:6.10» 6.x-1.x-dev
Component:filter.module» Code

Interesting bug ;)

Drupal core has no PHP code filter, so I believe this belongs in the code filter project.

#2

kenorb - April 29, 2009 - 14:12

Ah, sorry;)

 
 

Drupal is a registered trademark of Dries Buytaert.