Re: keep the new line character in SQL server text

From: Nicole Calinoiu (nicolec_at_somewhere.net)
Date: 05/21/04


Date: Fri, 21 May 2004 11:09:45 -0400

Unfortunately, that's not quite so. If it were, it would be a very
convenient way to avoid HTML and script injections. (Which, incidentally, I
didn't mention just because it seemed like neither the place nor the time...
<g>)

"Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
news:eZgI58zPEHA.832@TK2MSFTNGP09.phx.gbl...
> Just an aside, if there is HTML content in the text (e.g. <b>text</b>),
> the
> <pre> tag will show the tags instead of the intent. Just something to
> consider; I mainly use this for HTML content, so I prefer to replace the
> white space cr+lf with HTML cr+lf.
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
>
>
> "Nicole Calinoiu" <nicolec@somewhere.net> wrote in message
> news:e8YKpnzPEHA.3524@TK2MSFTNGP09.phx.gbl...
>> Caspy,
>>
>> This is very unlikely to have anything to do with SQL Server or your data
>> storage. Instead, it's most likely the result of HTML display rules,
> which
>> preclude the rendering of extended white space. To conserve the
>> paragraph
>> formatting, you can wrap the text in a PRE element. e.g.:
>>
>> <pre>Your text goes here with
>>
>> white space
>>
>> preserved at rendering.</pre>
>>
>> See http://www.w3.org/TR/html4/struct/text.html#edef-PRE for the official
>> word on the PRE element.
>>
>> HTH,
>> Nicole
>>
>> "Caspy" <caspases@yahoo.com> wrote in message
>> news:OsP8KOzPEHA.628@TK2MSFTNGP11.phx.gbl...
>> >I am developing a web site for a discussion forum with SQL server 2000
>> >as
>> > back end data storage. The post messages are save as 'text' in
>> > database.
>> > Messages are extracted from a text box. In the text box, poster can
>> > have
>> > some format like new paragraphs to make post look better. However, the
>> > message from the SQL server lost all new line characters. each message
> is
>> > long string with any line break. How to keep the paragraph format?
>> >
>> > thanks,
>> >
>> > --Caspy
>> >
>> >
>>
>>
>
>



Relevant Pages

  • Re: adding white space in


    ... >>> If you check the HTML specification (as people should do at least ... So revealing the URL will just make this explicit: ... only the following characters are defined as white space ... of space characters other than those explicitly identified ...
    (comp.infosystems.www.authoring.html)

  • Re: Textcolor, Backgroundcolor - but i need TextBackgroundcolor ?
    ... fields - where a user can maintain a database. ... by HTML or JS or something? ... Remove white space before and after value then add one space to the end ... problem solving. ...
    (alt.html)
  • Re: HTML - problem with white spaces
    ... > I've got a problem with html. ... > Does anybody know what I have to do (special tag, ... > want that html code like: ... Problem with white space? ...
    (alt.html)
  • Re: [SPAM DETECT] New lines are not removed using HTML::Strip::Whitespace module
    ... Is there any other perl modules or tools available to remove the white space in HTML and JavaScript pages? ... Shopping ... Find Great Deals on Holiday Gifts at Yahoo! ...
    (perl.beginners)
  • Re: New Paragraph frpm Access
    ... What you're describing is not "paragraphs" per se, ... breaks follow different rules in HTML. ... of "white space" characters in it (including line breaks, spaces, tabs, ... HTML document in a text editor without having the lines run infintely across ...
    (microsoft.public.frontpage.programming)

Loading