SCEditor icon indicating copy to clipboard operation
SCEditor copied to clipboard

HTML mode: " " is set often for normal whitespaces and leads to problems

Open q2apro opened this issue 7 years ago • 6 comments

Here is an example post:

image

This line was shown normally in the editor and the word "bekommen" should not be in the second line.

The HTML created by SCEditor:

<p>Falls ihr noch keinen Paypal.me-Link habt, könnt ihr diesen hier bekommen:&nbsp;<a href="https://www.paypal.com/paypalme/grab" rel="nofollow" target="_blank">https://www.paypal.com/paypalme/grab</a> - Selbstverständlich braucht ihr vorher ein Paypal-Konto.</p>

As we can see there was an HTML whitespace set bekommen:&nbsp; which connects the text with the anchor link, creating a long text line that the Chrome browser puts onto the next line.

Can we avoid the &nbsp; if they are single? Or what other solution could there be?

q2apro avatar Jan 30 '18 10:01 q2apro

Other examples:

<p>
	Damit ihr als&nbsp;Mitglied dieses Feature aktivieren könnt, müsst ihr&nbsp;mindestens <strong>1000 Punkte</strong>&nbsp;auf der Mathelounge/Nanolounge (getrennte Punktesysteme) haben.&nbsp;
</p>

Especially the HTML whitespace at the end of the line makes no sense :)

Also the HTML whitespaces between two words is not necessary.

q2apro avatar Jan 30 '18 10:01 q2apro

You're right the editor should normalise this. It should preserve user inserted non-breaking spaces but remove automatically inserted ones when they're not next to another space.

samclarke avatar Jan 30 '18 13:01 samclarke

I've just checked and at least in Chrome this seems to already be mostly handled. For some reason it uses non-breaking spaces around links but can't get it to happen between words. What browser were you using to get the second example?

samclarke avatar Jan 30 '18 13:01 samclarke

For all examples I was using Chrome Version 63.0.3239.132 (64 bit).

q2apro avatar Jan 30 '18 16:01 q2apro

Can I suggest to add &nbsp; only if the spaces has been hit two times? Then a some text: <a href="... would not be parsed to some text:&nbsp;<a href="...

q2apro avatar Feb 13 '18 07:02 q2apro

Can we get the status from "Minor bug" to "Bug"?

I have just checked the posts of the last two weeks in my production enviroment. Result 143 occurences of &nbsp;<a where the HTML space is set by just a single space.

q2apro avatar Feb 15 '18 11:02 q2apro