3

It appears that the onebox (and link-detecting, for that matter) mechanism is broken by special symbols (see here).

For example, the URL https://stackapps.com/questions/2177/stackexchange™-supercollider-freehand-circle™-editor-now-supported-on-every-s#comment10630_2177 is registered in chat (and on sites) as https://stackapps.com/questions/2177/stackexchange (which still works, but doesn't jump to the specified comment).

If you need any more proof than that, look at what it does here:

StackExchange™ SuperCollider Freehand Circle™ Editor - [Now supported on EVERY StackExchange site!]™-supercollider-freehand-circle™-editor-now-supported-on-every-s#comment10630_2177

1

Interestingly, when I copy that URL using Chrome, I get http://stackapps.com/questions/2177/stackexchange%E2%84%A2-supercollider-freehand-circle%E2%84%A2-editor-now-supported-on-every-s#comment10630_2177 - no special characters.

Firefox has the same behavior. So I'm left wondering how you actually managed to end up with that URL in the first place...

That said, if there's a browser out there that's giving you un-escaped URLs in these situations, then the proper solution here is probably to just strip those characters when creating the slug.

  • Or delete the slug, so as to just be left with http://stackapps.com/questions/2177/#comment10630_2177 – doppelgreener Oct 1 '14 at 1:32
  • 1
    "...just strip those characters when creating the slug." It did that in the past, but I imagine that behaviour made for pretty boring slugs on the language sites. – Tim Stone Oct 1 '14 at 2:39
  • Still don't know how Astro even got that link, so... – Shog9 Oct 1 '14 at 2:54
  • @Shog9 I just right-clicked and copied the link. It might be something Safari-specific, but it's certainly odd (and I can repro it). Is the URL when you're actually visiting the question escaped? – AstroCB Oct 1 '14 at 5:18
  • @AstroCB I just tested on Chrome, Windows 7. When I copied the URL from the question body and pasted it on the address bar, the URL shown was exactly the same; it wasn't escaped. But when I copied the URL from Chrome's address bar, the next time you pasted will already be in escaped-form. However, right-clicking the link and choosing "Copy link address" will also give escaped-form. – No Distraction Wizard Oct 1 '14 at 16:37
  • My gut feeling is that this is a safari bug; not seeing anywhere we don't encode the slug properly. – Shog9 Oct 1 '14 at 18:50
  • So are you saying that all browsers that contain unescaped chars like $ and ^ are broken and to use those URIs in chat everyone who creates these URIs should be fixed? – PlasmaHH Nov 11 '15 at 20:19
  • I'm saying that we're escaping those characters everywhere they would otherwise appear in canonical links, @PlasmaHH - if your browser is unescaping them, then that's a bug you should report to your browser vendor. – Shog9 Nov 11 '15 at 23:33
  • @Shog9: I dont think any browsers out there will ever always escape chars like $ and ^ that appear that way in copied URIs, most probably because it is legal for them to be in there and they do not care about single sites not being able to handle that... – PlasmaHH Nov 12 '15 at 6:54
  • Where did you get $ and ^ from, @plasma? This thread was concerned with non-ascii characters. – Shog9 Nov 12 '15 at 7:04
  • @Shog9: because $ and ^ do seem to be special symbols, and my question about them (meta.stackexchange.com/questions/269224) was closed as a duplicate of this one. – PlasmaHH Nov 12 '15 at 10:19

You must log in to answer this question.

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