----- Original Message -----
From: Emile Heyns <[EMAIL PROTECTED]>
To: David Guerizec <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 02, 1999 4:03 PM
Subject: Re: [midgard] little bug in midgard-php


> David Guerizec wrote:
> >
> > Hi everybody,
> >
> > I found a little bug in the way midgard-php handles &...; variables.
> > Here is a piece of code that demonstrate it :
> >
> > <p>Here is a special character : &<? echo "copy"; ?>;</p>
> >
> > Put it on a page, and look at the generated source in your browser.
> > It shows :
> > <p>Here is a special character : &<? echo "copy"; ?>;</p>
> >
>
> If you did something like
>   <? $code="<p>Here is a special character : &<? echo \"copy\"; ?>;</p>"
> ?>
> then later
>   &(code);
>
> try
>   &(code:p);
> instead.
>
> Bye,
> Emile
>

I know I can do it another way, but this is really a bug compared to the
original implemantation of php3.
If you have a static site, this can cause trouble with this kind of syntax
(seen in phpMyAdmin, file tbl_properties.php3) :

<a href="sql.php3?sql_query=<?php echo urlencode("SELECT * FROM
$table");?>&pos=0&<?php echo $query;?>"> ... </a>

shows with midgard-php :
sql.php3?sql_query=SELECT+%2A+FROM+country&pos=0&<?php echo $query;?>

note: For those who use phpMyAdmin and have an error message "no database
selected" I resolved the problem by putting <?php echo $query;?> at the
start of the arguments :
<a href="sql.php3?<?php echo $query;?>&sql_query=<?php echo
urlencode("SELECT * FROM
$table");?>&pos=0"> ... </a>

regards

[EMAIL PROTECTED]





--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to