Le ven, 24 mar 2000, vous avez �crit :
>Hi all,
>
>I have a problem (bug) with midgard 1.2.6, The problem appeard when I
>switched from 1.2.5 to 1.2.6 first beta. The bug was so annoying that I
>thougth it will be fixed soon but it still exists in 1.2.6 beta 2.
>My problem is the following:
>some characters in pages, articles, etc. gets too much escaped.
>For exemple if I have the following code in a page:
>$i = "home";
>when I save the page I get:
>$i = \"home\";
>and each time I save the page I get more and more '\'.
>With this bug midgard is unusable.
>I tryed to managed where the bug come from but didn't really get it.
>I made the following change to format.c:
>
>int mgd_parser_addsql(mgd_parser *parser, const char *str)
>{
> if (str) while (*str) switch (*str) {
>/*
> case '\'':
>if (!mgd_parser_addstr(parser, "\\\'")) return 0; str++;
>break;
> case '\"':
>if (!mgd_parser_addstr(parser, "\\\"")) return 0; str++;
>break;
> case '\\':
>if (!mgd_parser_addstr(parser, "\\\\")) return 0; str++;
>break;
>*/
> default:
>if (!mgd_parser_addchar(parser, *str)) return 0; str++;
>break;
> }
> return 1;
>}
>
>This code do not escape any character and I thougth that I won't be
>able to save any page/article containing single quote, but it works!
>and MySQL log file show me that ' and " are escaped.
>
>Any idea?
>Thanks in advance for your help.
After some tracing, I've been able to manage where the problem come
from. This came from "magic_quotes_gpc" option that was "on". This
option already escape some chars. So you should be aware that midgard
is not compatible with "magic_quotes_gpc = On" option.
--
Ronan-Yann Lorin t�l: +33 617 960 627
3, All�e des Hirondelles t�l: +33 134 506 034
95220 Herblay mailto:[EMAIL PROTECTED]
France http://duke.adesium-services.fr/~lorin
--
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]