Re: HTML and slashes.

From: Date: Tue, 17 Apr 2001 15:45:17 +0000
Subject: Re: HTML and slashes.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-48988@lists.php.net to get a copy of this message
<snip> I want to hide the HTML from the browser. If someone adds some malicious code, or even <u></u> I don't want it to underline. Could you rephrase this? You want to "hide" the HTML from the browser? If the browser doesn't see any HTML, good luck getting a web page. If you're trying to hide the HTML from the user, you're in for some fun...you can do things like disable right clicking, but then they can view source the page. You can make the page contain frames and then they'd see the frameset, and wouldn't be able to click into the source...but then they could check the page referenced in the url attribute of your frameset...basically, as said before, you can't completely cut the end user off from the HTML output...what are you worried about anyway, with the <u></u> example? As far as the name\'s problem, check php.net for info about magic quotes...you probably have them on...if they are on, PHP will "magically" put a \ in front of ' or " so you don't have to worry about that when you enter your data into wherever...you can disable it in your php.ini, or at runtime... -jack > > > Where does the " 's " problem come in? More detail plz. > > Is it a part of a text? Then try htmlspecialchars() or > > htmlentities(). > > Say I right "Hiya, my name's Owen" on the submission part of the form. > It'll > show up as "Hiya, my name\'s Owen" on the output (which is a .txt file.) > > HTH, > Owen > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#48988) next »