Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • 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

  • 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

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

    Sajid

  • Get RSS Feed

1 Answer

  • Jul 28, 2017 at 09:51 AM

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

    How
    Now
    Brown
    Cow
    edit: it does not appear to happen in answers
    Add comment
    10|10000 characters needed characters exceeded