Re: Newline and tab characters
- From: news@xxxxxxxxxxxxx (Al)
- Date: Mon, 26 Mar 2007 09:13:22 -0400
Browsers ignore \n \r and \t. Look at the resultant html source code in your browser.
Something is converting them BEFORE sending the html code to the client browser.
Arno Kuhl wrote:
I've just noticed that "\r\n" and "\t" characters create a space when.
rendered in the browser (tested in IE and Firefox). I'd always thought the
browser would ignore these characters. This wouldn't normally be a problem
but the wysiwyg html editor in the cms I'm using tries to be friendly by
formatting the html code, so something like
<span style=\"COLOR: #af0e14\">get</span><span style=\"COLOR:
#333333\">online</span>
becomes
\r\n\t\t<span style=\"COLOR: #af0e14\">get</span>\r\n\t\t<span
style=\"COLOR: #333333\">online</span>
and instead of being displayed as getonline it's displayed as get online.
Is there a simple way to sort this out or do I need to create a function to
strip these characters before display, checking first that they don't occur
within a <pre> tag in which case I mustn't strip them.
TIA
Arno
- References:
- Newline and tab characters
- From: "Arno Kuhl"
- Newline and tab characters
- Prev by Date: Re: [PHP] My own "captcha" from 2 years ago......
- Next by Date: RE: [PHP] My own "captcha" from 2 years ago......
- Previous by thread: Re: [PHP] Newline and tab characters
- Next by thread: Re: [PHP] Newline and tab characters
- Index(es):
Relevant Pages
|