RE: Bug #13574 Updated: strip_tags() adds space after '\n'

From: Date: Sat, 06 Oct 2001 18:00:39 +0000
Subject: RE: Bug #13574 Updated: strip_tags() adds space after '\n'
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67439@lists.php.net to get a copy of this message
Hi, Rasmus im putting this text into a <textarea name=body> using: window.document.broad.body.value='Please use the following symbols for this template:\n<|LINK|> - merchant link (tracking purposes[http://www...])\n<|MNAME|> - merchants website name\n<|DATE|> - current date\n'+window.document.broad.body.value; after submit <textarea> adds '\r\n\' now i do: $body = strip_tags($body); echo "<pre>$body</pre>\n"; and the spaces are located at the begining of 2nd and 4th line have good one, Dan -----Original Message----- From: Bug Database [mailto:php-dev@lists.php.net] Sent: Saturday, October 06, 2001 1:53 PM To: sonic@sonic.sk Subject: Bug #13574 Updated: strip_tags() adds space after '\n' ID: 13574 Updated by: rasmus Reported By: sonic@sonic.sk Old Status: Open Status: Feedback Bug Type: *General Issues Operating System: UNIX PHP Version: 4.0.6 New Comment: I can't reproduce this For example, this code: $text = "This is just a test\nLine 2\nLast line"; echo strip_tags($text); Produces this (output run through od -c): 0000000 T h i s i s j u s t a t 0000020 e s t \n L i n e 2 \n L a s t 0000040 l i n e No extra spaces anywhere. Could you show me a simple example that does this for you? Previous Comments: ------------------------------------------------------------------------ [2001-10-06 13:47:40] sonic@sonic.sk strip_tags() adds a space after '\n', when string does not contain any html tags ------------------------------------------------------------------------ ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=13574&edit=2

« previous php.dev (#67439) next »