Periods mistakenly interpreted as part of URLs, breaking hyperlinks

Steps to reproduce

  1. Open a file in Obsidian.
  2. Type or paste a URL.
  3. Put a period at the end if there isn’t one already. (I use Chicago style academic citations, which requires URLs to go at the end of citations and requires that all citations end with a period. I don’t know how many other citation styles do this.)

Expected result

I expected the URL to either remain normal text or automatically become a hyperlink. If it became a hyperlink, then I expected only the URL to be a hyperlink. No other part of the citation – including the period at the end – should become part of the URL.

Actual result

The URL becomes a hyperlink, which is great. Unfortunately, the period at the end becomes part of the URL. The hyperlink goes to the wrong URL as a result.

Environment

  • Operating system: macOS 10.15.4
  • Obsidian version: 0.6.7
  • Using custom CSS: Only the Nord community theme.

Additional information

Here is a video demonstration of the bug.

As a suggested solution, automatically omit periods is at the end of a URLs. Simple as that. I don’t think any actual URLs end with a period, and therefore won’t result in undesired behavior.

I can see how this might seem like a small bug because it’s literally just a dot, but broken links are frustrating! Seeing the period become part of the URL is frustrating! Adding spaces between the URLs and period only to remove those spaces later if I want to use the citation… you get the idea. As Obsidian’s usage among academics grows, this is issue likely to become an increasingly common complaint until it’s fixed.

1 Like

I am sorry but we will not change Obsidian behaviour for this. It’s not really our bug. Dots at the end of URLs are valid. You will have this problem in any other app you paste citations in this format.

I suggest you contact Zotero’s devs and made them aware of this issue and/or define a custom Chicago style within Zotero where you fix this issue yourself.

It’s not really our bug.

I agree that it’s not your fault that the world wide web’s addressing system works the way it does. But fixing this in Obsidian doesn’t mean taking responsibility for that. It only means taking responsibility for your UX.

Dots at the end of URLs are valid.

Not in practice. Google Docs, LibreOffice, your own forum software, and other programs make sure that periods at the end of URLs aren’t part of URLs. Here:

Carroll, Glenn R., and Dennis Ray Wheaton. “Donn, Vic and Tiki Bar Authenticity.” Consumption Markets & Culture 22, no. 2 (March 4, 2019): 157–82. https://doi.org/10/ggw56p.

I urge you to copy and paste that citation in other programs to see for yourself how many other developers decided to make sure that periods at the end of URLs don’t become part of URLs. You don’t have to do anything just because everybody else is, but I think it’s at least valuable to consider the possibility that there’s often a reason.

Also, I doubt they consider it “their” bug for the same reasons you don’t consider it yours. They nonetheless choose to fix it in their respective programs for UX reasons.

I suggest you contact Zotero’s devs and made them aware of this issue and/or define a custom Chicago style within Zotero where you fix this issue yourself.

Zotero is doing exactly what it should: providing a correct citation. If they messed with it, then it would no longer be correct. If they did anything to (somehow) make it so that periods at the end of citations don’t become part of URLs in Obsidian, then it would no longer work correctly with any other program.

And if I defined a “custom Chicago style,” then it would no longer be a correct Chicago style citation.

I’ll go away now. I’m sorry for being such a pain.

I have made some further research. The situation is more complicated than I initially thought and the spec isn’t clear. We will fix this at some point.

2 Likes

The preview parser already ignores the trailing dot.

Will be fixed in 0.7.5