Zero width space character (\u200b) causing issues with rendering and linking

Steps to reproduce

  1. When copying text from a Word doc, or from various websites, sometimes the zero width space character slips in (char. is found at https://www.htmlsymbols.xyz/unicode/U+200B)
  2. If you paste any text with that character (i.e. into the filename, or at the very end of a bold or ==highlighted== word/section.) rendering of text styling around it like bold/italics are often thrown off. Linking also does not work.

Expected result

  • Ideally, zero width space characters would be removed/rejected from filename strings when pasted in. And perhaps a similar result in the body of the file.

Actual result

  • If these characters sneak into titles, they make it impossible to properly link to that file. They also cannot be easily found, you have to manually retype the title, thus omitting the zer width space character.
  • If these characters end up in the body of the file, they are “rendered” by a small red dot, but they throw off other text rendering like bold/italics.
  • I was able to search and replace within a file to remove the characters causing issue, but search and replace doesn’t work for filenames

Environment

  • Operating system: Mac OS
  • Obsidian version: 0.6.7
  • Using custom CSS: “Gastown” by dogwaddle

Additional information

We may have fixed in 0.7. Let me know if this problem is solved when we release it.

I think this is 1/2 fixed, thankfully Obsidian shows a dot symbol in the title when there is a zero width space character. So that part of the issue seems to be fixed, but I’m still getting this issue with the formatted text rendering. This is mostly only an issue when I am importing text and applying formatting through iA Writer, VS Code, or importing a plain text file from Dynalist, since the zero width space character doesn’t show in those apps.

Do you have 0.7?

Oh yes I forgot to mention I am on 0.7.1 now.

I’d say this isn’t a very important issue, since I do 90% of my note formatting in Obsidian and can catch these little buggers at that time lol

On windows I don’t see the red dots on the title, I can see them in the document.

I find quite strange that you have all these Zero width space character in your documents.

Is it possible that your soruces or in processing pipeline, you instert these characters?
It’s not normal.

This might work for you if you can copy and paste the following lines, also see attached screenshot:

  • ==F​or exam​ple, this quoted text should contain 4 zero-width space charac​ters, but it will break because there is one that trails the period.==​ — Halfro
  • ==F​or exam​ple, this quoted text also contains 4 zero-width space charac​ters, but it will not break because I’ve moved the one that trails ​the period.== — Halfro

What seems to be happening is some sites/articles I read contain these hidden characters right after punctuation, ***especially when they show sources of quotes at the end like.***​ - Quote Source

I’ve now noticed this only happens when it is directly trailing punctuation/spacing and not alphanumeric.

  • 1​
  • **1.**​
  • **1)**​
  • a​
  • **a. **​
  • **a **​
  • **a)**​

I understand your issue. What I am puzzled is why this is happening to you so frequently. We haven’t had other users lamenting the massive presence of these \u200b while coping text.
Ideally, you should not have any of these characters.

The problem is not really obsidian, it is the place where your are copying from (or the source). Why do they put these characters?
Are you coping from pdfs?

Gotcha, I’ll share another example of how I encountered this issue, I was reading an article found here on my iPad, and I had copied and pasted the entire text into iA Writer. I began bolding and highlighting snippets of the article from there and when I went to the desktop and viewed from Obsidian, that’s when I noticed this error.

But either way, I think the breaking issue has been remedied which was the hidden characters in note titles. Like you said, this is mainly an issue with whatever source I am copying and pasting from. Thanks for your help on this one.

1 Like