Very good like always 😉
NodeBB Twitter / X embeds
-
@DownPW Can you PM me the link to prod so I can have a look?
-
@DownPW There appears to be a space inserted in the URL?
Note, after the
/
where it is formatted as/ SaxX/
-
hmm not on my screen :
but “_” dissapear
-
@DownPW Can you grant my login temporary admin?
-
@DownPW I see the issue. The URL has underscores present
This basically means that the composer sees this as Markdown and is attempting to render it as such. It’s not a bug in the X embed code. I may be able to work around it though.
-
@phenomlab said in NodeBB Twitter / X embeds:
@DownPW I see the issue. The URL has underscores present
This basically means that the composer sees this as Markdown and is attempting to render it as such. It’s not a bug in the X embed code. I may be able to work around it though.
yep I tell you that here :
@DownPW said in NodeBB Twitter / X embeds:
URL:
Itt seems on my forum the “_” character was delete in the URL (Don’t know why) :
-
@DownPW Yes. Can you grant me admin temporarily for your site?
-
@DownPW this should work now with the below commit
https://github.com/phenomlab/nodebb-twitter-embeds/blob/main/embeds.js
The reason is that markdown processes the URL and replaces
_
with<em>
meaning the tweet can no longer be rendered. The quick “fix” would be to escape the underscore characters, so_SaxX_
becomes\_SaxX\_
but that really is ugly, and places the responsibility on the OP, or an admin to go in and makes those changes afterwards.This new code effectively changes
into
https://x.com/\_SaxX\_/status/1850458923481825567?mx=20
It then removes the
<em></em>
tags, and implodes the URL so the Tweet Parser can read it. In a nutshell, you land up with thishttps://x.com/SaxX/status/1850458923481825567
-
@phenomlab said in NodeBB Twitter / X embeds:
@DownPW this should work now with the below commit
https://github.com/phenomlab/nodebb-twitter-embeds/blob/main/embeds.js
The reason is that markdown processes the URL and replaces
_
with<em>
meaning the tweet can no longer be rendered. The quick “fix” would be to escape the underscore characters, so_SaxX_
becomes\_SaxX\_
but that really is ugly, and places the responsibility on the OP, or an admin to go in and makes those changes afterwards.This new code effectively changes
into
https://x.com/\_SaxX\_/status/1850458923481825567?mx=20
It then removes the
<em></em>
tags, and implodes the URL so the Tweet Parser can read it. In a nutshell, you land up with thishttps://x.com/SaxX/status/1850458923481825567
That’s Fix works great
-
@phenomlab Still have this issue where certain posts will show up blank until you refresh the page. Any clue what to do? Using your latest code.
-
@OT I honestly am not able to replicate this. Can you PM me a link to a post on your forum with the specific issue so I can have a look?
Related Topics
-
-
-
-
-
-
-
-
[NODEBB] Stats
Unsolved Customisation