Has something changed with pasting html into the composer?

Recently I noticed that when I paste (some) text into the composer span tags are included. For example

<span lang="en">Then the brahmin Jānussoṇi went up to the Buddha, and exchanged greetings with him.</span><span lang="en">When the greetings and polite conversation were over, he sat down to one side and said to the Buddha:</span>

I can only reproduce this when the spans include the lang parameter.

And strangely, if I type three back ticks in the composer to start a code block and paste the text on the next line, the span tags are not pasted. So

Then the brahmin Jānussoṇi went up to the Buddha, and exchanged greetings with him. When the greetings and polite conversation were over, he sat down to one side and said to the Buddha:

That’s really, really strange.

Was there some change to the way html gets processed? I know (and appreciate) that some limited html gets converted into Markdown. However those spans should not be pasted.

(If anything, pasting into a code block should include the spans and pasting into a regular paragraph should not. But honestly I don’t think they should be pasted anywhere)

Where did you copy the text from?

@renato has been doing some fixes in this area recently, not sure if there’s been any regressions though.

Here is an example page.

I have tried pasting similar text that has spans without the lang params and they paste as normal, i.e. no html span tags. That’s why I’m thinking it has to do with the lang

I should also note we are on v2026.7.0-latest.

I merged an improvement yesterday to avoid these span HTML elements when they come from Word, but I’ll take another look with your example. Please let us know if you find any other example.

Just note than a span element with the lang attribute is a valid combination as an inline html markdown-it token, the system is keeping them for consistency because it’s “valid”, my concern is “fixing it too much” and stripping instances with additional attributes that were intentional (maybe not even an issue, I’ll investigate).

This is not the case because the clipboard contains both HTML and text/plain in this scenario, and the system uses the appropriate origin if you paste outside vs inside a code block.

Someone suggested I share a screenshot of what I mean:

In the rendered (?) version it looks fine except for the fact that the space is missing between the spans.

EDIT: But we don’t want them in the composer at all. They make things really messy and hard to read.