Spaces being added to clean paste

Before opening a new bug report, please search the forum for duplicates and follow the Troubleshooting Guide.

  • Developer issues with the API should go here
  • Themes and Custom CSS issues should go here
  • Translations issues/improvements should be posted here
  • Obsidian Clipper Bugs should be posted here
  • Obsidian Importer Bugs should be posted here
  • We only accept bug reports that are reproducible with the installation methods we provide on our website. If you obtained obsidian elsewhere, you MUST reproduce the problem with one of the officially supported installation methods. (No ARCH, NixOS, homebrew, chocolatey, third party packages).

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Go to a YouTube video
  2. Select the title of the video
  3. Paste on Obsidian using ctrl-shift-v to a clean paste (removing formatting)

Did you follow the troubleshooting guide? [Y/N]

Yes.

Expected result

Title pasted without spaces before and after the string (string=video title)

Actual result

The video title has spaces before and after.

Environment

SYSTEM INFO:
Obsidian version: 1.13.0
Installer version: 1.12.7
Operating system: #22-Ubuntu SMP PREEMPT_DYNAMIC Mon May 25 15:54:34 UTC 2026 7.0.0-22-generic
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 18
Plugins enabled: 7
1: Git v2.38.3
2: Copy document as HTML v0.8.1
3: Hider v1.6.2
4: Plugin Update Tracker v1.7.0
5: Harper v2.4.0
6: Editor Width Slider v1.0.5
7: Simple Vault Importer v1.0.3
RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

Using ctrl-v, there is no space before and after. Using ctrl-shift-v, to a clean paste, there are spaces before and after.

I am not sure what you mean by clean paste, maybe paste without formatting?

Anyway, try to copy and paste on this website and then make a screenshot of the result.

Yeah. Clean paste means paste without formatting.

I posted yesterday the problem but today I couldn’t reproduce this one related to YouTube. I will wait to happen again and I will use this link to show what I got.

Right now, it also happens in the title of this page, but in this case it just adds a space in the end: https://developers.redhat.com/articles/2026/06/08/build-local-voice-agent-red-hat-openshift-ai#

I can see in this second case there is the `u{10}`, but the space didn’t appear when a just copy and paste with formatting (when the line starts with a hash for the formatting), but when I paste without formatting, the space is there.

I have been unable to reproduce this problem.

How did install Obsidian? appimage or snap?
Which browser are you using?

Post a screen recording of this happening in the sandbox vault. Thanks

Here it is. Sorry, I had to convert to GIF because MP4 is not supported in the forum.

ezgif-29cc7933b4af340b

I’m using Firefox 151.0.3 and Obsidian installed with .deb package.

The problem is partially that page and partially firefox.
When you select the whole line, Firefox puts a space at the end the sentence in the clipboard.

On the on the other hand, chrome puts a new line:

This is not something we are gonna work on. Sorry

Hmmm…. So why when I paste keeping the formatting, Obsidian doesn’t add the space?

Because the “paste with formatting” is using an HTML to Markdown converter and the extra space is trimmed in that process.

So, shouldn’t remove the space in the non formatted paste to keep things consistent? Or what another line of action do you suggest, open a bug report to Firefox?

The paste without formatting uses the text/plain field in the clipboard and doesn’t do anything else. If the space it’s there, it’s there.

You can ask Firefox why they add a space or Chrome why they add a new line.

If anybody has this problem, here is a link to a bug report about it: 1625057 - Firefox includes trailing space when selecting text via click and drag