Make WordPress Core

Opened 3 years ago

Last modified 22 months ago

#55803 new defect (bug)

Span is removed from title due page saving

Reported by: joyster's profile joyster Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.9.3
Component: Editor Keywords: has-testing-info needs-patch has-screenshots
Focuses: Cc:

Description

Hello,

since the update to wordpress 5.9 we detected some strange behavior, when editing existing posts, that contains HTML-Tags in their post title.
The problem is, when editing the post, the HTML-Tags in the post title, are not displayed in the editor. The tags are just cutted out from the title. This problem have only editor group, admin group is ok with saving span in title.

Steps to reproduce:

  1. Create a new post with HTML-Tags in the title for example: "<span>This is my title</span>"
  2. Save and publish the post with this title
  3. Go back to the "All posts" list
  4. Post is correctly displayed with "<span>This is my title</span>" in the list
  5. Edit the post
  6. post title lost the <span>-Tags
  7. Change the post title to "This is my title 2"
  8. Save the post
  9. <span>-Tags are totally gone, even in the "All posts" list.

Change History (15)

#1 follow-up: @costdev
3 years ago

  • Keywords reporter-feedback added

Hi @joyster, welcome to Trac!

Can you confirm whether you're using the built-in Block Editor or the Classic Editor plugin?

#2 in reply to: ↑ 1 @joyster
3 years ago

Replying to costdev:

Hi @joyster, welcome to Trac!

Can you confirm whether you're using the built-in Block Editor or the Classic Editor plugin?

Hello, we use classic editor

#3 @joyster
3 years ago

@costdev Hello, still waiting for the answer.

#4 follow-ups: @costdev
3 years ago

  • Keywords needs-testing has-testing-info added; reporter-feedback removed

Hi @joyster, apologies for the delay - quite a lot of work in the past few days as I'm sure you can imagine 🙂.

Let's add needs-testing and has-testing-info to see if this can be reproduced by the Test team. If I get a chance, I'll add a reproduction report myself. Test team: If I haven't posted one when you read this, go ahead and post one! 🙂

To other contributors:
This ticket is very closely related to #55125. However, #55125 refers to an issue with the Block Editor, not the Classic Editor. See the upstream issue for #55125.

This may mean:

  • Both are caused by an issue in Core.
  • The issue exists in code within Core and in Gutenberg.

#5 in reply to: ↑ 4 @joyster
3 years ago

Replying to costdev:

Let's add needs-testing and has-testing-info to see if this can be reproduced by the Test team. If I get a chance, I'll add a reproduction report myself. Test team: If I haven't posted one when you read this, go ahead and post one! 🙂

I'm sorry. Where I need to add this?

#6 @costdev
3 years ago

Hi @joyster, I have already added these keywords 🙂

#7 @pooja1210
3 years ago

Hi @costdev, @joyster

I tried to reproduce the issue and was able to reproduce.

Followed the same steps as shared in the ticket description:

  • Add post title with HTML tag
  • Observed that the HTML tag was retaining in Post listing(All Posts)
  • Then edited the post, observed that the HTML tag from the title was gone
  • Edited the post title again, observed that the HTML tag from the title was not gone from post listing(All Posts) as well

Conclusion: Yes the HTML tags are not retaining in Edit Post screen and on Post listing after the post title is being edited.

Test Environment:
WordPress: v5.9 and also checked with v6.0
And no other plugin installed/activated.

Screenshots:

Thanks!

Last edited 3 years ago by pooja1210 (previous) (diff)

#8 @joyster
2 years ago

Hello. Will be any soluion of this issue?

#9 @joyster
2 years ago

@costdev @pooja1210 Hello. Stil waiting for the answer. Tell me please do you have any solution for this? or update?

#10 @costdev
2 years ago

  • Component changed from General to Editor
  • Keywords needs-testing removed
  • Milestone changed from Awaiting Review to 6.1

Hi @joyster, I'm milestoning this ticket for WordPress 6.1 (the version we're currently working on) and contributors will do what they can do to get a fix for this issue in our next release.

#11 @rafiahmedd
2 years ago

I was able to reproduce the issue and I think this is something related to Gutenberg. I will do some more tests and will try to make a good solution on this.

This ticket was mentioned in Slack in #core by chaion07. View the logs.


2 years ago

#13 @chaion07
2 years ago

  • Keywords needs-patch added
  • Milestone changed from 6.1 to Future Release

@joyster thank you for reporting this. We reviewed this ticket during a recent bug-scrub session. Here's the summary of the feedback received:

  1. Adding keyword needs-patch
  2. Updating milestone to 'Future Release' considering Beta 1 for WP 6.1 being released today.

Cheers!

Props to @mukesh27 & @robinwpdeveloper

#14 @ironprogrammer
22 months ago

  • Keywords has-screenshots added

Reproduction Report

I am able to reproduce this issue using the Editor, but not with the Classic Editor plugin activated as originally noted in comment:2. Note that testing in comment:7 did not have any plugins active, whose results are consistent with my testing.

Environment

  • Hardware: MacBook Pro Apple M1 Pro
  • OS: macOS 12.6.3
  • Browser: Safari 16.3
  • Server: nginx/1.23.3
  • PHP: 7.4.33
  • WordPress: 5.9.3 and 6.1.1
  • Theme: twentytwentytwo v1.1
  • Active Plugins:
    • classic-editor v1.6.2; both inactive 🔴 and active 🟢

Actual Results

  • ✅ With built-in WordPress Editor, modifying a saved post title wrapped in <span> tags causes the tags to be removed when saved again.
  • ❌ With the Classic Editor plugin active, <span> tags around the post title are retained and editable.

Supplemental Artifacts

✅ Reproduced with native Editor.

❌ Unable to reproduce with Classic Editor active.

#15 in reply to: ↑ 4 @ironprogrammer
22 months ago

Replying to costdev:

This ticket is very closely related to #55125. However, #55125 refers to an issue with the Block Editor, not the Classic Editor. See the upstream issue for #55125.

If anyone can reproduce this issue using the Classic Editor, please share your results 🙏🏻 I think that's what is preventing this from moving forward.

Otherwise, I would recommend this ticket be marked as a duplicate of the other ticket noted above.

Note: See TracTickets for help on using tickets.