Javascript errors and site half-broken if we add * in markdown_linkify_tlds setting

AI-generated summary

A discussion on a bug in Discourse version 2.9.0.beta2 and beta3 highlights that adding the * character to the markdown_linkify_tlds site setting causes JavaScript errors and breaks the topic creation functionality, resulting in a 500 error. Canapin reports the issue, noting the lack of warning when adding invalid characters, and suggests either preventing or allowing such entries given the growing number of valid domain extensions. maiki confirms the bug and supports the idea of allowing * for broader domain coverage. isaac responds by confirming the fix, stating a validator has been added to the site setting to prevent invalid inputs and provide user feedback.

I understand this character is forbidden here, but we have no warning of any kind if we add it.

If you add * to markdown_linkify_tlds, there is no issue at first, but if you try to create a topic for example, even without starting to write you’ll have a bunch of javascript errors; the forum will be half-broken. You’ll be able to browse it but not create posts.

Tested on 2.9.0.beta2 4be0e86f1e

Suggestion: prevent the admin (or allow them? :person_shrugging: there are so much valid domain extensions nowadays…) of adding the * character in markdown_linkify_tlds site setting.

4 Likes

I can reproduce with 2.9.0.beta3 4d809e984d.

Attempting to publish a new topic returns a 500 error.

I agree, if I found a domain not linking correctly, adding * to the setting would be my first move. :slight_smile:

4 Likes

Thank you for bringing this up. I have added a validator to the site setting, and it will provide feedback in the case you add an invalid value!

5 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.