[bug] Escaped HTML post rendering problem #847

Open
opened 2024-11-01 17:00:43 +00:00 by a1batross · 3 comments

Your setup

From source

Extra details

No response

Version

v3.13.2 with https://akkoma.dev/AkkomaGang/akkoma-fe/commit/4a50b12

PostgreSQL version

14

What were you trying to do?

No response

What did you expect to happen?

No response

What actually happened?

The user on my instance reported me a bug where the timeline and notifications stopped rendering for them.

As they told, this happened after they made a particular post with HTML type. After opening the post by its URL, it doesn't render for me either.

I got original post content, before it was HTML processed, and tried to look it up through Preview on Akkoma-FE and had the same rendering problem.

The post content:

<a href=\"\\&quot;https://x.com/miwapeito/status/1852049757759508667\\&quot;\">RT</a> <a href=\"\\&quot;https://x.com/miwapeito\\&quot;\">@miwapeito@x.com</a>: Happy 1 Year Anniversary Chiwa <a class=\"hashtag\" data-tag=\"artwa\" href=\"https://suya.place/tag/artwa\" rel=\"tag ugc\">#artwa</a>

If I manually strip all escape symbols, the post gets rendered normally:

<a href="https://x.com/miwapeito/status/1852049757759508667">RT</a> <a href="https://x.com/miwapeito">@miwapeito@x.com</a>: Happy 1 Year Anniversary Chiwa <a class="hashtag" data-tag="artwa" href="https://suya.place/tag/artwa" rel="tag ugc">#artwa</a>

Another broken case:

<a href=\"https://x.com/ENVTubersOOC/status/1851847986839515438\">RT</a> <a href=\"https://x.com/ENVTubersOOC\">@ENVTubersOOC@x.com</a>:

This might be an Akkoma-FE bug, but I'm unsure.

Logs

No response

Severity

I cannot use the software

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup From source ### Extra details _No response_ ### Version v3.13.2 with https://akkoma.dev/AkkomaGang/akkoma-fe/commit/4a50b12 ### PostgreSQL version 14 ### What were you trying to do? _No response_ ### What did you expect to happen? _No response_ ### What actually happened? The user on my instance reported me a bug where the timeline and notifications stopped rendering for them. As they told, this happened after they made a particular post with HTML type. After opening the post by its URL, it doesn't render for me either. I got original post content, before it was HTML processed, and tried to look it up through Preview on Akkoma-FE and had the same rendering problem. The post content: ``` <a href=\"\\&quot;https://x.com/miwapeito/status/1852049757759508667\\&quot;\">RT</a> <a href=\"\\&quot;https://x.com/miwapeito\\&quot;\">@miwapeito@x.com</a>: Happy 1 Year Anniversary Chiwa <a class=\"hashtag\" data-tag=\"artwa\" href=\"https://suya.place/tag/artwa\" rel=\"tag ugc\">#artwa</a> ``` If I manually strip all escape symbols, the post gets rendered normally: ``` <a href="https://x.com/miwapeito/status/1852049757759508667">RT</a> <a href="https://x.com/miwapeito">@miwapeito@x.com</a>: Happy 1 Year Anniversary Chiwa <a class="hashtag" data-tag="artwa" href="https://suya.place/tag/artwa" rel="tag ugc">#artwa</a> ``` Another broken case: ``` <a href=\"https://x.com/ENVTubersOOC/status/1851847986839515438\">RT</a> <a href=\"https://x.com/ENVTubersOOC\">@ENVTubersOOC@x.com</a>: ``` This might be an Akkoma-FE bug, but I'm unsure. ### Logs _No response_ ### Severity I cannot use the software ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
a1batross added the
bug
label 2024-11-01 17:00:43 +00:00
Author

Yet another broken case:

Broken: <a href=\"https://akkoma.dev/AkkomaGang/akkoma/issues/847\">issue</a>
Works: <a href="https://akkoma.dev/AkkomaGang/akkoma/issues/847">issue</a>

This is especially dangerous as it affects both HTML and Markdown post type.

Yet another broken case: Broken: `<a href=\"https://akkoma.dev/AkkomaGang/akkoma/issues/847\">issue</a>` \ Works: `<a href="https://akkoma.dev/AkkomaGang/akkoma/issues/847">issue</a>` This is especially dangerous as it affects both HTML and Markdown post type.
Member

Does the API query error out and if so with what response?
Do server-side logs show anything related?

Does the API query error out and if so with what response? Do server-side logs show anything related?
Author

@Oneric no, nothing times out.

Result reply from the API is in the attachments. I didn't notice that before but it gets rendered fine on Husky but completely breaks the FE.

@Oneric no, nothing times out. Result reply from the API is in the attachments. I didn't notice that before but it gets rendered fine on Husky but completely breaks the FE.
7.2 KiB
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#847
No description provided.