Discuss Scratch

fdreerf
Scratcher
1000+ posts

Are text fragments supported on Scratch?

I was unsure whether to make a question, a suggestion, or a bug report topic, so I made a question.

Recently, I had the idea of using text fragments when linking to the Official List of Rejected Suggestions. This would mean that when clicking on the link, it will take you right to the specific entry in the list, no need to quote and delete the parts you don't need, or copy and paste and manually format it. I tested it by opening up a new tab and paste in the link there, and sure enough it highlighted the text I wanted and I was sent right there.

But when clicking on it through a BBCode link, it doesn't work. The link isn't bad as I already tested that it worked, so does Scratch or the ancient DjangoBB simply not support text fragments? They are quite the recent development, and the forums haven't been updated in years, so I wouldn't be surprised.

Last edited by fdreerf (Sept. 22, 2020 16:54:57)

Vibrato
Scratcher
1000+ posts

Are text fragments supported on Scratch?

most likely DjangoBB.
Maximouse
Scratcher
1000+ posts

Are text fragments supported on Scratch?

I think't it's because DjangoBB automatically URL-encodes everything you put into the url tag, changing, for example,
https://scratch.mit.edu/discuss/topic/343602/#:~:text=1.2,this%20post.
to
https://scratch.mit.edu/discuss/topic/343602/#:%7E:text=1.2%2Cthis%20post.
which makes the link non-functional because the tilde and comma are essential. The Scratch Team should probably fix this, I would consider it a bug.
But I think I know a workaround…
fdreerf
Scratcher
1000+ posts

Are text fragments supported on Scratch?

Maximouse wrote:

But I think I know a workaround…

fdreerf wrote:

You can't just pique my curiosity and then prevent me from the answer at the same time like that!
Maximouse
Scratcher
1000+ posts

Are text fragments supported on Scratch?

fdreerf wrote:

Maximouse wrote:

But I think I know a workaround…

fdreerf wrote:

You can't just pique my curiosity and then prevent me from the answer at the same time like that!
OK, the idea is to set up a server which accepts an encoded path and redirects you to that page on scratch.mit.edu (I tried a client-side redirect but it didn't work).

Then you can link to (assuming the server is at example.com)
https://example.com/discuss%2Ftopic%2F343602%2F%23%3A~%3Atext%3D1.2%2Cthis%2520post.
pavcato
Scratcher
1000+ posts

Are text fragments supported on Scratch?

lol um, I was playing around with my keyboard and then downloaded this topic as an HTML.

Powered by DjangoBB