Re: cvs: docweb /include docweb_language.class.php /scripts gen_picture_info_all_lang.php /www revcheck.php

From: Date: Sun, 31 Oct 2004 00:34:51 +0000
Subject: Re: cvs: docweb /include docweb_language.class.php /scripts gen_picture_info_all_lang.php /www revcheck.php
References: 1 2 3  Groups: php.doc.web 
Request: Send a blank email to doc-web+get-376@lists.php.net to get a copy of this message
Vincent Gevers wrote:
I'm using the suggested settings from INSTALL.txt sincve this morning and the "\'" still appeared, so I added stripslashes and it worked :) looking into it.. <!ENTITY ... 'don\'t do this'> <!ENTITY ... "and he said \"you shouldn't do that\""> the last one always needs escaping.. Therefor I think the safe_stripslashes() (or a shorter name) would be the best solution.
Ah, now that I've looked further into it, I see that my assumption about magic_quotes_* was bad. I didn't realize that the quotes were manually escaped. So, seems stripslashes does, in fact, apply in this case because '\' is rarely (if ever) used in language, and is (almost?) always a meta character. So, that works for me. Is that the proper way to escape entities? My parser is a regex, and doesn't necessarily follow XML's official rules. The other option, here, is ' -> &apos; and " -> &quot; Again, I'm ok with either one. S

« previous php.doc.web (#376) next »