32

I just stumbled upon this question, back over on Stack Overflow: Expanding tabs independent of each other in jQuery

Reproduced below:

I can't help but note the absence of code in the question, and the presence of a functioning link to JSFiddle; I'm pretty certain this was disallowed for a long time, is it allowed now?

It's worth noting that the question has since been edited to include the code, and the OP appears to have accepted the advice in the comments with good grace; this isn't intended to be punitive in any way, I'm just curious about the (apparent) change.

Incidentally, it seems the issue is reproducible using any link of the form http://jsfiddle.net/#, any sequence of characters (URL-safe alphanumerics at least) can follow the # character, but the presence of the # seems to enable linking without code. Which seems a problem. It seems that these are JSFiddle's 'collaboration links.'

Given the reproducibility of this situation, I've pretty much decided to raise this as purely a , since I can't imagine that it's a desired behaviour given that it allows links-to-code to be posted without code.

It may be worth noting that this seems to be linked with, but not a duplicate of, Barmar's question: Should we discourage links to JSFiddle collaboration sessions?


Incidentally, just now, I found this question (Make checkbox checkable) which, again, was successfully posted despite the absence of any code in the question, and with a functional link to JS Fiddle:

I have hidden checkbox and I can't reach JS code which allows me to do checkbox checkable. How can I do it? Here is my code http://fiddle.jshell.net/ta7w7bb8/

And the non-rendered Markdown:

I have hidden checkbox and I can't reach JS code which allows me to do checkbox checkable. How can I do it?
Here is my code http://fiddle.jshell.net/ta7w7bb8/

Is this because it links to fiddle.jshell.net, rather than jsfiddle.net? This check (and presumably not just the JS Fiddle-based checks) seem to be becoming somewhat porous, now.

8
  • 1
    I just tried this and could not submit without adding the code. Commented Nov 5, 2014 at 19:23
  • That's weird; because I clicked the link and ended up at the destination; and I don't seem to have any browser extensions running that would have tried to help. Commented Nov 5, 2014 at 19:25
  • 8
    Maybe the # trips the check assuming it is a link to the homepage only? I think it is a bug...
    – rene
    Commented Nov 5, 2014 at 20:32
  • @rene: it could well be, I don't see a more plausible reason, certainly. Commented Nov 5, 2014 at 20:59
  • 10
    @rene: it's definitely the #, I just successfully posted a question using the same URL from the posted question, then with just http://jsfiddle.net/, http://jsfiddle.net/# and http://jsfiddle.net/#sdg23d (a random-ish string of keypresses to my knowledge); it only started to refuse submission when I removed the #. Commented Nov 5, 2014 at 22:24
  • 3
    @Astro: thanks for the edit (I'm amazed I didn't realise that was appropriate information to add to the question myself >.<) Commented Nov 5, 2014 at 23:45
  • 1
    The check hasn't changed - but it assumes that any problematic links will have a path. If the fiddle ID is contained in the fragment, the check ignores it. (If/when anyone decides to fix this, PostValidation.cs#L422)
    – Shog9
    Commented Nov 8, 2014 at 4:36
  • @Shog9: any chance you could post that as an answer, so I can accept that explanation? Commented Jan 11, 2015 at 22:49

1 Answer 1

8

Answering for posterity, but I still consider this a bug: the logic that checks for this assumes that any problematic links will have a path.

This design avoids blocking links to the default pages for the various code-hosting services while still enforcing the code restriction on likely links to hosted code. But it falls apart completely for these "collaboration" links, which contain the relevant identifiers in the URL fragment.

As an interim solution, I've blacklisted https?://(www\.)?jsfiddle\.net/#, which should prevent these links from being included period.

0

You must log in to answer this question.

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