4

When posting links to SE posts in comments, where links are not converted to links with titles, the tooltips for those links are not capitalized.

For example, this is a bare link with an uncapitalized tooltip:

enter image description here

And this is the actual post with the title capitalized:

enter image description here

Note that the bare links I'm referring to above are the ones which are copy-pasted from the address bar or by right-clicking the title. Bare links which are copy-pasted from a question or answer's Share box do not have tooltips as they don't have slugs.

5

2 Answers 2

6

They are not capitalized because that is not the title of the question that is shown in the tooltip.

It is the so called slug at the end of the url with the - replaced by a space. By design the slug is always lower case. And the slug itself is irrelevant for the correct working of the link. You can add any slug you want:

Try this comment:

test comment to see if slug matters https://meta.stackexchange.com/questions/379235/and-now-for-something-completely-different

leading to this tooltip:

tooltip

and the link still works.

2
  • Thanks, rene.. that makes sense. But slugs can be capitalized, no? i.stack.imgur.com/tcK03.png | i.stack.imgur.com/4Tf9X.png
    – Justin
    Jun 4, 2022 at 8:27
  • 2
    @Justin slugs can be capitalized, but that looks like a different question of why all generated URLs on Stack Exchange are in lower case (example: your name and my name on profile links, which are also slugs). Jun 4, 2022 at 8:31
2

I just made the userscript SmartPostLinks to solve this. On top of question title, it will also display: post type, author, author rep, date created, last activity date. It will also work in chat, and chat transcripts. It also generally works for post links from other sites on the Stack Exchange network (except the Hot Network Questions, which I disabled it otherwise it will make too many requests - one per unique site).

Userscript SmartPostLinks ( source | install )

Screenshots

Before (1):
Misleading post slug resulting in incorrect title attribute

enter image description here

After (1):
Link text and title attribute corrected by Smart Post Links, and displays more post info

enter image description here

Before (2):
Unknown short link (also known as share/referral link), requiring you to click on it to view post title/details (no title attribute set - no effect if you hover over such links)

enter image description here

After (2):
Post title for short link is now displayed upfront in link text, and more post info in title attribute

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .