[PHP] htmlspecialchars()

2004-03-25 Thread Anthony Ritter
php / mysql/ apache I tried the following using the call to htmlspecialchars() not sure why it is insn't working. I get the output: a href='test'Test/a Thank you. TR .. //script ? $new = htmlspecialchars(a href='test'Test/a, ENT_QUOTES); echo $new; ? // this is what is

RE: [PHP] htmlspecialchars()

2004-03-25 Thread Chris W. Parker
Anthony Ritter mailto:[EMAIL PROTECTED] 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(a

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: a href='test'Test/a Thank you. TR .. //script ? $new = htmlspecialchars(a href='test'Test/a, ENT_QUOTES);

[PHP] htmlspecialchars... or...?

2004-02-18 Thread Tristan . Pretty
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... htmlspecialchars only does

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...

[PHP] htmlspecialchars() and HTML code

2003-08-14 Thread Thaddeus J. Quintin
Hello- 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 for a textarea can wreak havoc and eat up the

Re: [PHP] htmlspecialchars() and HTML code

2003-08-14 Thread Thaddeus J. Quintin
CPT John W. Holmes wrote: --SNIP-- Try this: textarea name=textThis is lt;somegt; text/textarea If you submit that text and then print $_REQUEST['text'], you'll see that you have This is some text --SNIP-- Ok, but that only makes me realize the further extent of the problem. If the HTML

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 /textarea does not exist? If so, then consider NOT doing it, and instead solving the problem of a /textarea within the textarea. possible solutions may

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 'lt;' or 'gt;' 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

Re[2]: [PHP] htmlspecialchars() and HTML code

2003-08-11 Thread Tom Rogers
Hi, Saturday, August 9, 2003, 1:57:04 AM, you wrote: TJQ CPT John W. Holmes wrote: TJQ --SNIP-- TJQ Try this: TJQ TJQ textarea name=textThis is lt;somegt; text/textarea TJQ TJQ If you submit that text and then print $_REQUEST['text'], you'll TJQ see that TJQ you have TJQ TJQ This

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 for a

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 amp; then the browser will receive amp;amp;. HTH, Rob. On Fri, 2003-08-08 at 11:57, Thaddeus J. Quintin wrote: CPT John W. Holmes wrote: --SNIP-- Try this: textarea name=textThis

Re: [PHP] htmlspecialchars() and HTML code

2003-08-09 Thread John W. Holmes
Thaddeus J. Quintin wrote: CPT John W. Holmes wrote: --SNIP-- Try this: textarea name=textThis is lt;somegt; text/textarea If you submit that text and then print $_REQUEST['text'], you'll see that you have This is some text --SNIP-- Ok, but that only makes me realize the further

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: --SNIP-- Try this: textarea name=textThis is lt;somegt; text/textarea If you submit that text and then print

[PHP] htmlspecialchars

2003-01-14 Thread Foong
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 quote; in database) 2. stor the data in non encoded form and call htmlspecialchars whenever we want to display it. Foong -- PHP General Mailing

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 quote; in database) 2. stor the data in non encoded form and call htmlspecialchars whenever we want to display

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 quote; in database) 2. stor the data in non encoded form and call htmlspecialchars whenever we want

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] Subject: Re: [PHP

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 quote; in database) 2. stor the data in non encoded form and call htmlspecialchars

[PHP] htmlspecialchars() or htmlentities without destroying tags?

2003-01-07 Thread Justin French
Hi all, Has anyone got a function or regexp floating around that will convert behave like htmlspecialchars() or htmlentities() (eg converting to amp;, to quote;, etc etc) BUT NOT DESTROY HTML TAGS? Eg: hello said a href=fred.phpFred/a Judy should become: quot;helloquot; said a

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

[PHP] htmlspecialchars() alias

2002-01-17 Thread Jason G.
Hello General and Dev list, Considering the fact that it is good practice to use htmlspecialchars() anytime you are outputting non-html content to the browser... After typing the 16 characters in the htmlspecialchars() function thousands of times... I was wondering if it would be feasible to

[PHP] htmlspecialchars() backwards?

2001-09-25 Thread Jay Paulson
hello- Is there a built in function that will reverse what htmlspecialchars() does to text? For example: $text = stuff goes here\ and \' there; $text = htmlspecialchars($text); //now all the special codes are in the $text var for the html and now I want to get //back to the orignal string of

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

[PHP] htmlspecialchars() and MySQL

2001-09-12 Thread Augusto Cesar Castoldi
Hi. can someone explain this to me? How can I INSERT with mysql_query this string: Tsete aspas simpes '' aspas enter e maior e menor, but I can't do a SELECT after?, I receive error because the mysql can't understend the (). i'm using htmlspecialchars()... thanks. Augusto

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:

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 lt;, 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-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

[PHP] HTMLSpecialchars

2001-04-18 Thread Dddogbruce \(@home.com\)
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 br, but HTMLspecialchars tells it to not show that. Anyways, I'm sure there

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 br, but

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 br, but HTMLspecialchars tells it to not show that. Anyways, I'm sure

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

[PHP] htmlspecialchars Problem

2001-02-01 Thread Karl J. Stubsjoen
When I perform thi function: $new = htmlspecialchars("a href='test'Test/a", ENT_QUOTES); I get the following error: Warning: Wrong parameter count for htmlspecialchars() in utility/HTMLFormObjects1-1.php on line 135 Anyone know why? -- PHP General Mailing List (http://www.php.net/) To

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("a href='test'Test/a", ENT_QUOTES); I get the following error: Warning: Wrong parameter count for htmlspecialchars() in utility/HTMLFormObjects1-1.php on line 135 Anyone know why?