Hello,
Recently, without updating discourse or changing any settings, we got a problem with internal reference links:
When pasting a link to another topic in a post, the preview shows the reference fine but after posting, the reference is somewhat broken and shows part of the HTML:
In preview:
Posted:
As you can see, the first line shows: e class='quote' data-post="12" data-topic="87917">
which should be part of the reference content. Also, the user avatar and topic title must be inside the quoted area.
When I took a closer look at the requests, it seems the POST request sends a healthy “cooked” value as before but when gettig the post content, “cooked” value is already broken:
POST “cooked” body:
cooked:"<p><a href="https://forum.test.com/t/testing-links-pasting-in-with-broken-html/87917/12" class="onebox" target="_blank" rel="noopener">https://forum.test.com/t/testing-links-pasting-in-with-broken-html/87917/12</a></p>"
GET request response:
A post from before the issue:
"cooked": "...\u003C/p\u003E\n\u003Caside class=\"quote quote-modified\" data-post=\"2\" data-topic=\"66021\"\u003E\n \u003Cdiv class=\"title\"\u003E\n..."
the same post created after the issue:
"cooked": "...\u003C/p\u003E\ne class='quote' data-post=\"2\" data-topic=\"66021\">\n \u003Cdiv class=\"title\"\u003E\n..."
As you can see, right after \u003C/p\u003E\n
, \u003Caside
is broken to e
and after data-topic, \u003E
is chagned to >
I’m clueless of what has gone wrong. Can anyone help here please?