Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Computer Nerd Kev <not@telling.you.invalid> |
|---|---|
| Newsgroups | comp.misc |
| Subject | Re: What's Wrong With Newlines? |
| Date | 2019-04-17 07:04 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <q96j56$1qia$1@gioia.aioe.org> (permalink) |
| References | <q7ju57$pl4$1@gioia.aioe.org> <q7m2hj$re7$4@dont-email.me> <q7m7rm$15hq$1@gioia.aioe.org> <q7mcpb$1riu$1@gioia.aioe.org> <q7nuv9$82v$2@dont-email.me> |
Rich <rich@example.invalid> wrote: > Computer Nerd Kev <not@telling.you.invalid> wrote: >> >> Of course to put it into HTML the newlines have to be replaced with >> paragraphs or line breaks. Easily done with functions like nl2br in >> PHP though, and surely within the means of any developer for a major >> website. > > Hmm, that is also a very likely cause. HTML ignores ASCII \n > characters (treating them as nothing more than spaces). If the message > is being displayed in a web page somewhere, the programmer has to > explicitly translate \n characters from the textarea into <br> or <p> > tags in the resulting HTML. > > If they just insert the raw contents of the message box into a <p> > (or more likely a <div>) wrapper, you end up with this effect. > > What happens if you insert <br> or <p> into the text area when you are > sending the messages? Note that if those work to produce line breaks > on the other end, then it also means you can insert <script> tags to > make their browsers do anything you want. I finally found cause to use one that allows you to preview the text before sending. Indeed the newlines, in whatever form I enter them, are copied straight into the HTML, inside a <div>. Manually added <br>s and <p>s were stripped out, which is really a good thing. So they simply haven't cared to use a function which replaces newlines with <br> or <p>. Just lazyness or a lack of testing I guess, though it seems strange given that these are often very major websites. -- __ __ #_ < |\| |< _#
Back to comp.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What's Wrong With Newlines? Computer Nerd Kev <not@telling.you.invalid> - 2019-03-29 01:59 +0000
Re: What's Wrong With Newlines? Dan Espen <dan1espen@gmail.com> - 2019-03-28 23:31 -0400
Re: What's Wrong With Newlines? not@telling.you.invalid (Computer Nerd Kev) - 2019-03-29 23:22 +0000
Re: What's Wrong With Newlines? Mike Spencer <mds@bogus.nodomain.nowhere> - 2019-03-29 21:58 -0300
Re: What's Wrong With Newlines? Huge <Huge@nowhere.much.invalid> - 2019-03-30 11:23 +0000
Re: What's Wrong With Newlines? RS Wood <rsw@therandymon.com> - 2019-03-30 09:02 -0400
Re: What's Wrong With Newlines? Kees Nuyt <k.nuyt@nospam.demon.nl> - 2019-03-30 15:24 +0100
Re: What's Wrong With Newlines? Huge <Huge@nowhere.much.invalid> - 2019-03-29 09:32 +0000
Re: What's Wrong With Newlines? Bob Eager <news0073@eager.cx> - 2019-03-29 09:44 +0000
Re: What's Wrong With Newlines? not@telling.you.invalid (Computer Nerd Kev) - 2019-03-29 23:07 +0000
Re: What's Wrong With Newlines? Rich <rich@example.invalid> - 2019-03-29 21:26 +0000
Re: What's Wrong With Newlines? not@telling.you.invalid (Computer Nerd Kev) - 2019-03-29 22:56 +0000
Re: What's Wrong With Newlines? Computer Nerd Kev <not@telling.you.invalid> - 2019-03-30 00:21 +0000
Re: What's Wrong With Newlines? Rich <rich@example.invalid> - 2019-03-30 14:37 +0000
Re: What's Wrong With Newlines? Computer Nerd Kev <not@telling.you.invalid> - 2019-04-17 07:04 +0000
Re: What's Wrong With Newlines? Rich <rich@example.invalid> - 2019-04-17 12:23 +0000
Re: What's Wrong With Newlines? Rich <rich@example.invalid> - 2019-03-30 14:33 +0000
Re: What's Wrong With Newlines? scott@alfter.diespammersdie.us (Scott Alfter) - 2019-04-01 16:10 +0000
csiph-web