postiz-app
postiz-app copied to clipboard
Broken discord formatting
📜 Description
After a recent update, I can't use any formatting tools for my discord post, as all especial characters are escaped. This causes problems for inserting links, as they are posted as is on discord.
This issue also adds a backslash before every "_" character in the post, breaking a lot of links, and for some reason ignores some spaces.
There is another issue but I'm not sure if it's related. When queuing a post for discord via the public API, newline characters are completely ignored when posting, even when they appear in the UI. Also, if a link is surrounded with "<>" (To prevent automatic embedding), it will dissapear in the queued post and will have to be manually added.
👟 Reproduction steps
- Queue a post for discord with link formatting like
- Once posted, confirm brackets and parentheses are escaped and written like, breaking the link and not formatting it properly.
👍 Expected behavior
Special discord characters should not be escaped to allow for proper link formatting.
👎 Actual Behavior with Screenshots
This is how links look hen posted to discord
💻 Operating system
Linux
🤖 Node Version
Current Postiz version
📃 Provide any additional context for the Bug.
This started to happen last week or the week before that, I can't confirm the Postiz version where it started.
👀 Have you spent some time to check if this bug has been raised before?
- [x] I checked and didn't find similar issue
Are you willing to submit PR?
None
@vrisalab, Do you use the API or access it directly from the dashboard? It should work with html elements
Just added a version of hyperlinks in tiptap editor
I'm using the API, so I can't use the editor to add hyperlinks, or @ people. I also now cannot @ everyone, not with the editor or via the API, as in the editor, "everyone" is not an option, and in the API the discord command gets escaped and directly posted
Edit: I can now verify that links are now properly parsed, but if I surround them with "<>" characters to prevent embedding they get escaped and break the link. In general a lot of discord commands rely on special characters, so maybe they should only be escaped if they are 100% not used in any command.
@vrisalab I've just added a feature that if you don't send HTML, it won't parse it. Since you are using the Public API, you can do everything as before :)
The embeds and everything is working fine, but I can't insert the "<>" characters, which is needed for @'ing everyone and other roles
Can confirm it, 2.4.3 or 2.5.2 still does not correct that very important issue, making Discord almost unusable for its most important role.
Correction: Link formatting isn't working. When you insert a link in the editor, it tries to post it with the required formatting for links in discord, but somehow the special characters get ignored and the link just doesn't work
I really preferred it when the text box showed what was going to be sent as the post content, and the preview showed what it would look like. It's just so muddy now and you never know what is going to work and what is going to get escaped.
Honestly, one workaround, if you don't really use other services, is to revert to a build where these HTML conversions didn't happen, which is likely any version of Postiz before 2.1.0, as it actually broke way more things than intended.
Weirdly enough, I still don't understand why we still have to go use HTML formatting, when markdown is not only way more modern and common for people, but makes everything easier to handle text & formatting. And, which seems to also be natively used by the TipTap editor.
Build v2.5.4 does not seem to fix the issue of < and > still being escaped .
Honestly, one workaround, if you don't really use other services, is to revert to a build where these HTML conversions didn't happen, which is likely any version of Postiz before 2.1.0, as it actually broke way more things than intended.
Weirdly enough, I still don't understand why we still have to go use HTML formatting, when markdown is not only way more modern and common for people, but makes everything easier to handle text & formatting. And, which seems to also be natively used by the TipTap editor.
I had to downgrade all the way to 1.64.1, right before the tiptap editor was introduced, to remove all the issues mentioned in this thread, since downgrading to 2.0.8 fixed the mentions issue but not the other formatting issues (Links with text not working, and the underscore being escaped)
@vrisalab Thanks for making me aware of an even earlier release that actually works better than I thought !
Anyway, build 2.6.1 STILL does not fix this issue.
I am building a new version now, feel free to try it, I think it fixes it
I am building a new version now, feel free to try it, I think it fixes it
Looks like the underlined text still is overridden in the editor as bold text, and urls just disappear when under <>
Text used :
*Italic text*
**Bold text**
***Bolditalic Text***
~~striked text~~
__Underlined Text__
# URLs
- https://google.fr
- <https://google.fr>
- [This is another test link](<https://google.fr>)
Result :
I think it's working now. Can you take the latest version and try again?
Looks like the most important issues are fixed.
*Italic text*
Bold text
***Bolditalic Text***
~~striked text~~
__Underlined Text__
__**Underlined Bold**__
___**Underlined Bold Italics**___
|| Spoiler Block ||
> Be me
> a quoted text
# URLs
- https://google.fr
- <https://google.fr>
- [This is a masked link](<https://google.fr>)
# Header 1
## Header 2
### Header 3
-# SubHeader
- Unordered Link #1
- Unordered link #1
- Unordered Link #2
1. Ordered List 1
2. Ordered List 2
3. Ordered List 3
1. SubList 1
`One Line block`
(POST-EDIT: for this one block, remove the '\' symbols)
\`\`\`golang
func test() error {
return nil;
}
\`\`\`
Testing pinging a group : <@&172102286628093953>
Testing pinging someone: <@133546841772916736>
There are still minor issues linked to Heytap's editor such as the underordered sublists cannot be done (the - symbol is removed), but small workarounds can be done, by copy/pasting your text directly into the editor.