mysteriousboy
mysteriousboy

Reputation: 159

How do I remove crlf in IE between string in text box

I have a simple text box. And for debugging purpose I have a submit button. Now when I write something in text box and click submit button I am printing content of the text box and its all fine. But when I copy the text from excel document it works fine if they are in horizontal row format but when I copy paste things from vertical column format only the first string is shown up in text box and submit prints only the first text in Internet Explorer. It works fine in Chrome and Firefox. When I copy pasted the vertical string in Notepad++ I see that they are determinates by CRLF. So I am curious how would I get all the content as in chrome. In chrome when I copy paste the same things all the string are visible in text box and it prints fine.

Upvotes: 1

Views: 298

Answers (1)

SeanCannon
SeanCannon

Reputation: 77996

Copying and pasting from an application into a web browser is a can of worms. Some browsers have a "Paste as plain text" option which strips out special control characters. IE doesn't appear to have that option. Microsoft claims that CTRL+V will paste as-is, and Edit->Paste will paste as plain text. This has never worked for me.

tl;dr: You remove them in another application before pasting into IE.

Resources:

Upvotes: 1

Related Questions