Links with underscores posted on new.reddit.com are broken on old.reddit.com

Desktop Web

Edit 2: I figured out steps to reproduce, see comments.

Edit: Huh, seems like I'm wrong about new.reddit.com being the source. I don't know what the source is, perhaps one of the mobile apps, but see the link at the bottom of the post. In either case it should never be possible for links, or any other kind of content, to be different between different official versions of reddit, regardless of what was used to post it (even if it's an unofficial app).

I am posting this through new.reddit.com. Here is a link: https://en.wikipedia.org/wiki/Technical_debt

Try clicking this link on new.reddit.com. It works fine.

Try clicking this link on old.reddit.com. Instead of .../Technical_debt, you'll end up at .../Technical\_debt - which is a broken link.

Example in the wild: https://old.reddit.com/r/SamsungDex/comments/utjifz/inspired_by_the_bodyonly_macbook_pro_setups_i/i9a51ig/ - the YouTube link doesn't work for many users because the video ID includes an underscore.

That first link I posted is to the Wikipedia article on technical debt. Reddit has a lot of it.

Posted May 20, 2022, 2:37 PM UTC · edited

132
randomuser8765OP•
1
nmgreddit•

Was this purposely selected?

1
randomuser8765OP•

You bet

1
kc2syk•

BTW, u/underscorebot now exists to fix these links. Please feel free to call it on any broken URLs you find around.

1
randomuser8765OP•

Cool! Nice work!

2
kc2syk•

Thanks!

1
underscorebot•

Due to a reddit bug, URLs with underscores are being escaped in an inconsistent manner. Please try the following URL(s) instead:


^This ^is ^a ^bot. ^Invoke ^with: ^/u/underscorebot. ^Questions? ^Comments? ^/r/underscorebot ^Thank ^you. ^Moderators: ^this ^is ^an ^opt-in ^bot. ^Please ^add ^it ^to ^the ^approved ^submitters ^on ^subreddits ^you ^wish ^to ^have ^it ^scan. ^Note: ^user-supplied ^links ^that ^may ^appear ^in ^this ^comment ^do ^not ^imply ^endorsement.

1
randomuser8765OP•

Okay, steps to reproduce:

  1. Go to https://new.reddit.com/r/bugs/comments/utxx5e/links_with_underscores_posted_on_newredditcom_are/ (this thread using the redesign)
  2. Write a comment, end it with a URL that includes an underscore but don't add anything else after that URL (to prevent the URL from being turned into a hyperlink in the WYSIWYG editor)
  3. Post the comment by clicking the "Comment" button.
  4. Take a look at your comment through https://old.reddit.com/r/bugs/comments/utxx5e/links_with_underscores_posted_on_newredditcom_are/ - it is broken.
1
Daveed84•

Huh, seems like I'm wrong about new.reddit.com being the source.

You aren't wrong, it's the Fancy Pants Editor on New Reddit that breaks links with underscores.

1
randomuser8765OP•

Yes, but I only figured out how to cause this bug after writing that. It only happens if you post the comment before the URL turns into a hyperlink in the editor.

1
Daveed84•

Interesting, it didn't used to behave that way as far as I know. That's actually an improvement.

1