A bug has been discovered in Discourse where the end of a sentence is linkified when “markdown linkify” is enabled and “markdown linkify tlds” is empty. To reproduce, users can follow the steps outlined by tanius. maiki has confirmed the issue and advised disabling “enable markdown linkify” or adding a TLD as a temporary workaround.
tanius suggests that the fix could be to not allow “markdown linkify tlds” to be empty or to treat the empty case internally with the same code used when “enable markdown linkify” is set to false. sam agrees and will add a pr-welcome to implement this validation.
The original issue was discovered by tanius while experimenting with how to disable the “convert URL to title of linked page” behavior, also known as Inline Onebox. maiki shares a workaround for making URLs readable past markdown converters by using brackets to link to a topic.
To reproduce, make the following two admin settings:
enable markdown linkify: true
markdown linkify tlds: none (that is, delete all TLDs that are set by default)
Then do a “Rebuild HTML” for any post that includes a full sentence, and note that the last word at the end of every sentence, and the following dot, is now linkified. Example:
Alternatively, you could allow markdown linkify tlds to be empty, but treat that case internally with the same code used when enable markdown linkify: false has been set.
You’re raising a good point there
I was just experimenting how to get rid of the “convert URL to title of linked page” behavior. Later found it’s called Inline Onebox, and cannot be disabled for Discourse-internal links.