-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bbPress: emojis causing stray img tags to display #135
Comments
Hey there @johngodley ! This test page shows the stray closing img tags and the circumstances under which they appear: https://test.wordpress.org/support/topic/emoji-test/ It happens when:
I did not get the stray tags when typing an emoticon like Please let me know if I can help in any other way. Thank you! |
Also happens on windows by using the win+period key to insert emoji. |
Flagging this other emoji issue: |
I've released 1.14.2 which I think should fix this. I don't understand what https://meta.trac.wordpress.org/ticket/6703 means @kathrynwp, and the referenced report doesn't exist (for me anyway). Do you have any more details? If it's not the same issue here then it may be worth creating a new one. |
Thank you so much, @johngodley ! Good news: the issue looks to be resolved with emojis that are added from the system menu. I'm still seeing the same problem with copied emojis, but not sure how much of an issue that is. See my two test threads starting here: https://test.wordpress.org/support/topic/emoji-test/?view=all#post-11657373
I'm going to flag this one for Marius to look at, as I don't have more details. Thanks! |
I don't think it's been updated yet on wp.org. |
An interesting ticket, that may somehow be related to this, did land in core a few days back, cross-referencing here for the sake of completeness https://core.trac.wordpress.org/ticket/57517 What I suspect may be happening (and this may have other inverse effects in our forum scenario actually, where we'd need this to not happen), is that the twemoji has a global observer, and any time the DOM is updated, will replace emoji with a corresponding This is just a theory, as I've not had a chance to fully test it out locally yet (time constraints), but I wanted to sahre the discovery at least since you've been trying to track things down. If we could somehow have the twemoji fire once on DOM ready, and then have the global observer be killed, so it won't affect what's going on inside the editor afterwards, that would be ideal, as it would provide the original benefits on page load, but not interfere with anything else (I suspect this may come up if someone uses the block editor elsewhere as well via the blocks everywhere approach). |
On https://test.wordpress.org/support/topic/emoji-test this is still not fixed. In my recent test series from today some instances work and some fail. I do not recognize yet what makes the difference between success and failure. |
I'm not able to reproduce the problem with this plugin on a vanilla WP so I can only assume there is some difference on wp.org, which I don't have access to. Rather than continuing down the 'trying to fix the content after it's broken' route I've added a new |
Sorry my test postings, which show different outcomes for the same Emoji, are still in the moderation queue. When they get finally published, you can see that, and maybe realize what the crucial difference may be. |
It won't help any more than the other posts, but thanks. |
The test posts are now online. Despite unlikely, maybe it still brings some insight. |
Noting that the ability to skip the wpemoji handling landed in core yesterday, we if we can pass a wrapper element around the block editor with the correct class, we should (in theory at least) be able to skip it's processing of DOM nodes and hopefully address this in a more direct way? |
Thanks @Clorith that looks ideal! I'll add the class names in the next version. |
Note: If you want to inspect the post from the screenshot in markup or database representation it is / will be here. My posts on WP.org appear only delayed. I have a moderation flag since over a year already and the WP forum moderators say it will be lifted one day, but they still need more sample data. |
The |
Latest test still shows the same buggy behavior. |
Still happened on WP.org support forum today. |
I realized one more thing which may make a difference:
Quite many operations run when hitting ENTER in the Block Editor. Maybe the cause for this lies that not all blocks are treated the same by these methods, which leads to the disparities regarding Unicode replacement. See my video recording (4min, no audio) — Easily fast forward as needed and you still get the gist of it: Emoji.replacement.differs.by.block.type.and.between.ENTER.and.SHIFT-ENTER.mp4 |
In the published version the stray tags only happened on all instances where SHIFT-ENTER was used. There the replacement worked fine in the Editor environment. But after publishing they left the stray tag. |
Can someone please verify/falsify that the ENTER event makes the crucial difference? |
Side note:
|
I've made some changes via https://meta.trac.wordpress.org/ticket/6964 - I think this will fix the majority of the support forum issues, and I think this plugin has done everything within it's control (Adding the class, and then letting the bbPress install do what it wants). It looks like some Browsers might be choking on the emoji's still, and ignoring the class, so that might be a bug that needs to be reported to Core (But it might also be expected, as it depends on how Gutenberg works). Half the discussion in this issue seems like stuff that wasn't related to this plugin at all, some aspects of how Gutenberg does what it does is unescapable by this plugin. Some of the aspects of how Twemoji works is also out of our control. |
Situation worsened big time!
|
Dear support forum maintainer:
|
Full width SVG emojis got fixed 1-2 days after my report. |
I've added some base-styles for emoji fallback images in WordPress/wordpress.org@d9985c7 which resolved some of these issues. I suspect some of these issues were unrelated to Blocks Everywhere, and some were, confusion lead to everything being blamed on one thing where it actually had multiple aspects to it. |
Just documenting that this was resolved on the WordPress.org support forums, but probably still exists in the plugins bbPress handler The I've been using Firefox ESR 115 on a Linux virtual machine for testing emojis when I need to trigger the code. |
✅ Test was successful
|
WordPress.Forums.bbPress.Emoji.Test.2024-04-19.mp4 |
Emojis are sometimes causing closing
</img>
tags to appear in the WP.org forums.Live example:
https://wordpress.org/support/topic/front-page-74/#post-16371055
I also did some testing on the test site, adding emojis in three different ways. Here's the thread:
https://test.wordpress.org/support/topic/emoji-test/
Related: #111
The text was updated successfully, but these errors were encountered: