Skip to Content
0

[BUG] Q&A - editing code formatted text converts enters to html breaks

Jul 28, 2017 at 09:43 AM

100

avatar image

Hi,

When editing a comment (I have not tested it with an answer) that contains text formatted as code, that contains one or more enters, these enters are converted to HTML breaks <br>

I will test it out here
to see if it also applies
to questions
edit: and apparently it does not

Regards,

Johan

bug
10 |10000 characters needed characters left characters exceeded

Let's see if I can reproduce it here:

How<br>Now<br>Brown<br>Cow
edit: and there we have it
0

Hello Johan, apologies but I am not sure what the bug is from your description. I have tried inserting code below and pressed multiple enters. As expected, the cursor moved down a line as in a line break. If this is a bug, what is the expected behavior?

asd
asd
asd

Thanks,

Sajid Amir

0

Hi Sajid,

In my own comment above, you see the <br>s (HTML line breaks). I did not write those, instead the editor wrote them where I had originally written a line break (enter). This appears to happen when you edit the comment

It would seem that the behavior happens in specific scenarios only. I have not tested whether this happens with manual line breaks or with line breaks the editor provides, or with a combination of the two, or perhaps after removing the line breaks provided by the editor.

Regards,

Johan

0

Thank you for clarifying and testing Johan. I will share this with the team.
Best regards,

Sajid

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Johan Hakkesteegt Jul 28, 2017 at 09:51 AM
0

Let's see if we can reproduce it in an answer:

How
Now
Brown
Cow
edit: it does not appear to happen in answers
Show 5 Share
10 |10000 characters needed characters left characters exceeded
How
Now
Brown
Cow


becomes:


How<br>Now<br>Brown<br>Cow
0

Just another test:

Test1
Test2
Test3<br>

only single "<br>" is added
0

And one more test:

How
Now
Brown
Cow

edit: can't reproduce it
0

Testing some more. This time normal text with manual line breaks, formatted as code afterwards:

Result after edit:

How<br>Now<br>Brown<br>Cow
0

Testing some more. This time code formatting turned on first, then entered text with manual line breaks:

Result after edit:

How
Now
Brown
Cow
0