|
Posted by Jon on 11/04/05 17:57
Ok, well I've figured some things out here - I was incorrect in stating that
the newlines didn't go into the DB when the user copy/pastes an article...
as using nl2br() converts anytime the enter key was clicked.
My problem now is that there are roughly 85 word documents here, and many of
them, though there is whitespace between the paragraphs, they were not put
in there using the enter key. Much of it could have been copied/pasted from
other documents I suppose. Is there a way to get these "invisible" newlines
into the DB?
"Jon" <jonra@netins.com> wrote in message
news:dkfvl8$m2i$1@news.netins.net...
> All,
>
> I'm currently building a small application that will allow one of our
> users to submit news articles to his site, and I have a problem that I
> simply can't figure out.
>
> What I need to do is make it so if he were to copy/paste an article into a
> <textarea>, he will not have to enter any HTML or newline characters,
> however to display the artciles properly we'll need those in the DB.
>
> My question: Is it possible to pickup the actual newlines that are hidden
> from the front-end and submit a query that puts text into MySQL AS IS
> instead of having it go in as one block of text.
>
> I know I've also ran a query that submitted the spaces and newlines into
> the DB (although there were no symbols in the DB holding these, it was
> simply whitespace and breaks that were not otherwise indicated) - However,
> when I output this to a browser, all of these spaces and breaks are taken
> away. I know I could go in and setup newline's everywhere we need one and
> simply use nl2br() or something to replace the strings, but I don't want
> the user to be forced to do this.
>
> Ideas?
>
Navigation:
[Reply to this message]
|