linebreaks

php: capturing linebreaks (newline,linefeed) characters in a textarea

errr i checked the related questions using different re-phrase(s) of my question but nothing was related enough to my question.... anyway i have this form with a <textarea> and i wanted to capture any line breaks in that textarea on server-side and replace them with a <br/> is that possible? i tried setting the css of the textarea to whi...

How do i remove all linebreaks using XSLT?

I have something like this: <node TEXT=" txt A "/> <node TEXT=" txt X "/> <node> <html> <p> txt Y </p> </html> </node> <node TEXT="txt B"/> and i want to use XSLT to get this: txt A txt X txt Y txt B I want to strip all useless whitespaces and linebreaks of @TEXT's and CDATA's. The only XML-in...

ASP Line-breaks - \n?

Hey All, I have been searching for a way to insert linebreaks in my code for when I view my source. I am not looking for Something like the PHP equiv to \n Any ideas on how to do this in ASP? I will be placing this in side a string. Thanks, Ryan ...

Problem when retrieving text in JSON format containing line breaks with jQuery

I'm having a strange problem when retrieving JSON formatted text. I use jQuery post to send some data (also JSON formatted) to the server (running PHP) which works fine. Then, when I request the same data from the server using jQuery get, the callback method never executes. This only occurs when the data is JSON formatted and the data co...

HTML rendered incorrectly in .NET

I am trying to take the string "<BR>" in VB.NET and convert it to HTML through XSLT. When the HTML comes out, though, it looks like this: &lt;BR&gt; I can only assume it goes ahead and tries to render it. Is there any way I can convert those &lt;/&gt; back into the brackets so I get the line break I'm trying for? ...

Break line of code - javascript

Is there a character in JS to break up a line of code to read it as continuous despite being on a new line? Something like.... 1. alert ( "Please Select file 2. \ to delete" ); <-- ? Thanks ...

How can I stop Filezilla changing my linebreaks?

I'm downloading a perl CGI file from a Linux web server. It has Unix linebreaks. I edit it on a Windows PC with a decent text-editor (Geany) which preserves those linebreaks. I then upload it again with Filezilla and it has DOS linebreaks, which stop it working. I know it's Filezilla, not Geany because even if I just download it, and ...

If you break long code lines, how do you indent the stuff on the next line?

Sometimes you have to write in your source long lines, that are better to break. How do you indent the stuff ceated by this. You can indent it the same: very long statement; other statement; That makes it harder to differentiate from the following code, as shown in the example. On the other hand you could indent it one level: very l...

Maintaining page breaks

In my Rails app, I have a lot of data that is declared as text in the migration file. But when I print these attributes/fields out in the view, all the line breaks are lost and I get one large chunk of text. How do I maintain the line breaks? ...

Unix newlines to windows newlines (on Windows)

Does anyone know of a way (say Powershell, or a tool) in Windows that can recurse over a directory and convert any unix files to windows files. I'd be perfectly happy with a way in Powershell to at least detect a unix file. It's easy do this for one single file, but I'm after something a bit more scalable (hence leaning towards a Power...

How to insert line break within OPENXML spreadsheet cell ?

Hi, im currently using something like this to insert inline string in a cell : new Cell() { CellReference = "E2", StyleIndex = (UInt32Value)4U, DataType = CellValues.InlineString, InlineString = new InlineString(new Text( "some text")) } But \n doesn't work to insert line break, how can i do this ? Thanks Th...

PHP and HTTP Header Line Breaks: What character used to represent?

I'm looping through each line of a series of CURL returned http headers, trying to detect when one ends and the next begins. I know that an http header terminates with an empty line, but what character is used to represent this line break in php? I've tried with \n but it doesn't seem to work. I certainly could be doing something wrong. ...

How can I stop Chrome from adding extra line breaks in my textarea?

I have a form in asp that does some javascript error checking them shows a preview of the form information before the user submits it to our database. To enable light formatting before submission we replace all of the line breaks with tags. <textarea name="DATA_Description" ROWS=30 wrap=on cols="30"><%=DATA_Description%></textarea> R...

[vim] How to convert the ^M linebreak to 'normal' linebreak in a file?

vim shows on every line ending ^M How I do to replace this with a 'normal' linebreak? ...

hw to create line breaks between dynamically generated labels in a placeholder?

This is the code below in code behind file's Page_Load event: LinkButton linkButton = new LinkButton(); linkButton.ID = "LinkButtonDynamicInPlaceHolder1Id" + i; linkButton.ForeColor = Color.Blue; linkButton.Font.Bold = true; linkButton.Font.Size = 14; linkButton.Font.Underline = false; ...

textarea line breaks javascript

I got a textarea in javascript but the problem is that when i make line breaks in it they won't display how can i do this ? i'm getting the value and use a write function but it won't give line breaks Thanks in advance ...

Keeping page breaks from form input

In my Rails app, I want to keep the \n that are inputted in the forms. What I've done so far is output with simple_format(). But the problem is that simple_format wraps the text in < p >< /p > if there is a \n. This is problematic for my chatroom log as I don't want each message to appear in a new paragraph. What should I do instead? ...

Neatest way to remove linebreaks in Perl

I'm maintaining a script that can get its input from various sources, and works on it per line. Depending on the actual source used, linebreaks might be Unix-style, Windows-style or even, for some aggregated input, mixed(!). When reading from a file it goes something like this: @lines = <IN>; process(\@lines); ... sub process { @...

Setting encoding, newline, linebreaks, end-of-line (EOL) in PHP

For example, when I create a new file: $message = "Hello!"; $fh = fopen(index.html, 'w'); fwrite($fh, $message); fclose($fh); How can I set it's encoding(utf-8 or shift-jis or euc-jp) and linebreaks(LF or CR+LF or CR) in PHP? ...

<p> instead of <br />

I've been wondering if I can use <p>&nbsp;</p> (just space in paragraph) instead of <br /> ... Because I love to keep my code semantic and thought if this is right has been bothering me for a while now. I have seen WYSIWSG editors (TinyMCE) use this, but I still rather ask then do it wrong. ...