Re: [PHP] htmlspecialchars()

2004-03-25 Thread Chris Shiflett
--- Anthony Ritter <[EMAIL PROTECTED]> wrote: > I tried the following using the call to htmlspecialchars() > > not sure why it is insn't working. > > I get the output: > Test > > Thank you. > TR > .. > //script > > $new = htmlspecialchars("Test", ENT_QUOTES); > echo $new; > ?>

RE: [PHP] htmlspecialchars()

2004-03-25 Thread Chris W. Parker
Anthony Ritter on Thursday, March 25, 2004 12:41 PM said: ok first of all your email was pretty confusing until i read the entire thing! not that it's long, but that you sign off before you're even done with it. but i digress... > $new = htmlspecialchars("Test"

Re: [PHP] htmlspecialchars... or...?

2004-02-18 Thread "Miguel J. Jiménez"
[EMAIL PROTECTED] wrote: Hi all... I've having problems submitting information to salesforce.com... I have a system set up that allows my users here in the office, to send individual leads, to salesforce... However, if the users details contain characters such as... Ù ë ý Ñ Ã etc... htmlspecia

Re: [PHP] htmlspecialchars() and HTML code

2003-08-14 Thread Justin French
Have you done some testing with NOT converting the HTML within the textarea with htmlspecialchars() -- does it work for all cases where a does not exist? If so, then consider NOT doing it, and instead solving the problem of a within the textarea. possible solutions may include: 1. not allow

Re: [PHP] htmlspecialchars() and HTML code

2003-08-14 Thread Thaddeus J. Quintin
CPT John W. Holmes wrote: > Try this: > > This is text > > If you submit that "text" and then print $_REQUEST['text'], you'll see that > you have > > This is text Ok, but that only makes me realize the further extent of the problem. If the HTML file that they upload has '<' or '

Re: [PHP] htmlspecialchars() and HTML code

2003-08-12 Thread Juan Nin
From: "Thaddeus J. Quintin" <[EMAIL PROTECTED]> > If the HTML file that they upload has '<' or '>' entities, then > these characters will be displayed in the text area as '<' and '>' > symbols. So when the text is submitted from the textarea, all of the > user's HTML entities will have been dest

Re: [PHP] htmlspecialchars() and HTML code

2003-08-10 Thread Robert Cummings
You're safe because when you apply htmlentities() these will be doubly marked up. So if the file contains "&" then the browser will receive "&". HTH, Rob. On Fri, 2003-08-08 at 11:57, Thaddeus J. Quintin wrote: > CPT John W. Holmes wrote: > > > Try this: > > > > This is text >

Re: [PHP] htmlspecialchars() and HTML code

2003-08-10 Thread CPT John W. Holmes
From: "Thaddeus J. Quintin" <[EMAIL PROTECTED]> > I'm working on a site where users have the option to type HTML code into > a textarea, or upload HTML code from a local file which is then > displayed in the text area. > > The obvious problem is that an uploaded file that contains a closing tag > f

Re: [PHP] htmlspecialchars() and HTML code

2003-08-09 Thread John W. Holmes
Thaddeus J. Quintin wrote: CPT John W. Holmes wrote: > Try this: > > This is text > > If you submit that "text" and then print $_REQUEST['text'], you'll see that > you have > > This is text Ok, but that only makes me realize the further extent of the problem. If the HTM

Re: [PHP] htmlspecialchars() and HTML code

2003-08-08 Thread Thaddeus J. Quintin
Thanks everybody! Looks like I was just thinking about the problem too hard. Thaddeus John W. Holmes wrote: Thaddeus J. Quintin wrote: CPT John W. Holmes wrote: > Try this: > > This is text > > If you submit that "text" and then print $_REQUEST['text'], you'll see that > you

Re: [PHP] htmlspecialchars

2003-01-14 Thread Justin French
on 15/01/03 4:24 AM, Foong ([EMAIL PROTECTED]) wrote: > Hi, > I wonder which is the better way to store data into database? > 1. stor the data after we call htmlspecialchars with the data (means we > store " as "e; in database) > 2. stor the data in non encoded form and call htmlspecialchars whene

RE: [PHP] htmlspecialchars

2003-01-14 Thread John W. Holmes
---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 14, 2003 1:09 PM > To: [EMAIL PROTECTED] > Su

Re: [PHP] htmlspecialchars

2003-01-14 Thread Jason Wong
On Wednesday 15 January 2003 01:24, Foong wrote: > I wonder which is the better way to store data into database? > 1. stor the data after we call htmlspecialchars with the data (means we > store " as "e; in database) > 2. stor the data in non encoded form and call htmlspecialchars whenever we > wa

Re: [PHP] htmlspecialchars

2003-01-14 Thread Chris Shiflett
--- Foong <[EMAIL PROTECTED]> wrote: > I wonder which is the better way to store data into > database? > 1. stor the data after we call htmlspecialchars with the > data (means we store " as "e; in database) > 2. stor the data in non encoded form and call > htmlspecialchars whenever we want to displ

RE: [PHP] htmlspecialchars() alias

2002-01-18 Thread Jon Haworth
> I was wondering if it would be feasible to create > an alias for this function, say hsc() or something > short. function hsc ($foo) { $foo = htmlspecialchars ($foo); return $foo; } HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: [PHP] htmlspecialchars() backwards?

2001-09-25 Thread Philip Olson
See : http://www.php.net/manual/en/function.get-html-translation-table.php An example exists in there that does this. Regards, Philip Olson On Tue, 25 Sep 2001, Jay Paulson wrote: > hello- > > Is there a built in function that will reverse what htmlspecialchars() does > to text? > For ex

Re: [PHP] htmlspecialchars() and MySQL

2001-09-12 Thread Alexander Skwar
So sprach »Augusto Cesar Castoldi« am 2001-09-12 um 08:52:29 -0300 : > i'm using htmlspecialchars()... Switch to addslashes() to insert the data and stripslashes() when fetching the data from the DB + htmlentities/htmlspecialchars to display the values. Alexander Skwar -- How to quote: http:/

Re: [PHP] HTMLSpecialchars

2001-04-19 Thread Dddogbruce \(@home.com\)
Thanks for all the advice, Brian. If you're referring to a database as MySQL or any other database technology then I guess I haven't been precise enough. I'm really quite new into PHP and I'm just using text files for now. I'm slowly working my way up to MySQL, but fooling around with my learn

Re: [PHP] HTMLSpecialchars

2001-04-19 Thread Christian Reiniger
On Thursday 19 April 2001 07:11, you wrote: > > I'm having a problem with HTMLspecialchars and nl2br interfearing > // Convert < to <, etc > $output = htmlentities($content); Little note on the side: htmlentities () is usually better then htmlspecialchars (). (1) It has a shorter name *g* and

Re: [PHP] HTMLSpecialchars

2001-04-18 Thread Brian Clark
Hi Dddogbruce, @ 1:06:08 AM on 4/19/2001, Dddogbruce (@home.com) wrote: > I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br

RE: [PHP] HTMLSpecialchars

2001-04-18 Thread Jason Murray
> I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br adds , but HTMLspecialchars tells it to not show that. > > Anyways, I'm s

Re: [PHP] HTMLSpecialchars

2001-04-18 Thread David Robley
On Thu, 19 Apr 2001 14:36, [EMAIL PROTECTED] wrote: > I'm having a problem with HTMLspecialchars and nl2br interfearing with > each other. Obviously, I'm trying to stop malicous HTML/scripts from > being entered into my guestbook, but I'm also trying to add spacing. > nl2br adds , but HTMLspecial

Re: [PHP] htmlspecialchars Problem

2001-02-01 Thread David Robley
On Fri, 2 Feb 2001 05:58, Karl J. Stubsjoen wrote: > When I perform thi function: > $new = htmlspecialchars("Test", ENT_QUOTES); > > I get the following error: > > Warning: Wrong parameter count for htmlspecialchars() in > utility/HTMLFormObjects1-1.php on line 135 > > > Anyone know why? What ve