RSS Feed/News Copy & paste of <h1>1</h1>\n<p>2</p> behaves differently to <h1>1</h1><p>2</p>

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
29,047
Points
823

Reputation:

If you copy & paste from a HTML document with this sort of structure:
HTML:

Code:
<html><head></head>
<body>
<h1>1</h1>
<p>2</p>
</body></html>
It results in:
with newline said:
with newline said:

1​

2
Click to expand...
with newlineBut if you copy & paste the following structure (no newline between <h1 & ><p> tags:
HTML:

Code:
<html><head></head>
<body>
<h1>header</h1><p>Lorem ipsum</p>
</body></html>
It results in:
with new line said:
with new line said:

1​


2
Click to expand...

The linebreaks typically show up when copying HTML from firefox, while chrome will strip newlines between tags.

Continue reading...
 
Status
Not open for further replies.
Top