The URL patterns that are most useful for embedding within P2PU are<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>(1) <a href="http://jsfiddle.net/user/slug/embedded/">http://jsfiddle.net/user/slug/embedded/</a></div>
<div>(2) <a href="http://jsfiddle.net/user/slug/embedded/tabs/">http://jsfiddle.net/user/slug/embedded/tabs/</a></div></blockquote><div><br></div><div>and perhaps </div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>(3) <a href="http://jsfiddle.net/user/slug/show/">http://jsfiddle.net/user/slug/show/</a></div></blockquote><div><br></div><div>No need for anonymous fiddles, unembedded fiddles or skins. Tabs above means any comma separated combination of {result, html, js, css and resources}. I include case (3) because it in essence allows for a generic <iframe> from jsFiddle.net and blessed as safe if supported by <a href="http://embed.ly">embed.ly</a>.</div>
<div><br><div class="gmail_quote">On Fri, Sep 16, 2011 at 6:29 PM, Piotr Zalewa <span dir="ltr"><<a href="mailto:piotr@zalewa.info">piotr@zalewa.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I didn't knew about <a href="http://embed.ly" target="_blank">embed.ly</a><br>
<br>
Here is the regexp part from urls.py responsible for embedded<br>
<br>
# embedded<br>
r'^(?P<slug>[a-zA-Z0-9]{5})/<u></u>embedded/$'<br>
r'^(?P<slug>[a-zA-Z0-9]{5})/<u></u>embedded/(?P<tabs>.*)/(?P<<u></u>skin>\w+)/$'<br>
r'^(?P<slug>[a-zA-Z0-9]{5})/<u></u>embedded/(?P<tabs>.*)/$'<br>
r'^(?P<slug>[a-zA-Z0-9]{5})/(?<u></u>P<version>\d+)/embedded/$'<br>
r'^(?P<slug>[a-zA-Z0-9]{5})/(?<u></u>P<version>\d+)/embedded/(?P<<u></u>tabs>.*)/(?P<skin>\w+)/$'<br>
r'^(?P<slug>[a-zA-Z0-9]{5})/(?<u></u>P<version>\d+)/embedded/(?P<<u></u>tabs>.*)/$' name='embedded_with_version_<u></u>and_tabs'),<br>
r'^(?P<author>\w+)/(?P<slug>[<u></u>a-zA-Z0-9]{5})/embedded/$'<br>
r'^(?P<author>\w+)/(?P<slug>[<u></u>a-zA-Z0-9]{5})/embedded/(?P<<u></u>tabs>.*)/(?P<skin>\w+)/$'<br>
r'^(?P<author>\w+)/(?P<slug>[<u></u>a-zA-Z0-9]{5})/embedded/(?P<<u></u>tabs>.*)/$'<br>
r'^(?P<author>\w+)/(?P<slug>[<u></u>a-zA-Z0-9]{5})/(?P<version>\d+<u></u>)/embedded/$'<br>
r'^(?P<author>\w+)/(?P<slug>[<u></u>a-zA-Z0-9]{5})/(?P<version>\d+<u></u>)/embedded/(?P<tabs>.*)/(?P<<u></u>skin>\w+)/$'<br>
r'^(?P<author>\w+)/(?P<slug>[<u></u>a-zA-Z0-9]{5})/(?P<version>\d+<u></u>)/embedded/(?P<tabs>.*)/$'<br>
<br>
Names are explained in <a href="http://doc.jsfiddle.net/use/embedding.html" target="_blank">http://doc.jsfiddle.net/use/<u></u>embedding.html</a><br>
<br>
If someone would like to talk to me I'm sitting next to Exhibit Hall 1 entrence. (gchat <a href="mailto:zaloon@gmail.com" target="_blank">zaloon@gmail.com</a>)<br>
<br>
zalun<div class="im"><br>
<br>
On 09/16/11 17:55, Dan Diebolt wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
I am fairly certain that the problem with the jsFiddle embed is in the<br>
regular expression matching embedly uses to parse the ebmeded url.<br>
jsFiddle URLs can have a wide range of forms as they communicate the<br>
configuration of the fiddle using extra url paths. As a preliminary<br>
investigation I sent an inquiry to the jsFiddle mailing list and perhaps<br>
Zalun et al will come up with an answer. Then I will contact <a href="http://embed.ly" target="_blank">embed.ly</a><br></div>
<<a href="http://embed.ly" target="_blank">http://embed.ly</a>> and hopefully they will get jsFiddle on the provider list.<br>
<br>
==============================<u></u>============<br>
<br>
A platform I work with (<a href="http://p2pu.org" target="_blank">p2pu.org</a> <<a href="http://p2pu.org/" target="_blank">http://p2pu.org/</a>>) has attempted to<br>
use <a href="http://embed.ly" target="_blank">embed.ly</a> <<a href="http://embed.ly/" target="_blank">http://embed.ly/</a>> to come up with a shortcode to embed<div><div></div><div class="h5"><br>
jsFiddles into their platofrm via their configuration of CKEditor. Here<br>
is an example of the embed shortcode that works:<br>
<br>
[embed:<a href="http://jsfiddle.net/dandiebolt/agaCq/" target="_blank">http://jsfiddle.net/<u></u>dandiebolt/agaCq/</a>]<br>
<br>
Although jsFiddle is not on Embedly's provider list<br>
<br>
<a href="http://api.embed.ly/v1/api/services" target="_blank">http://api.embed.ly/v1/api/<u></u>services</a><br>
<br>
various forms of the jsFiddle URL do embed. I am not sure why that<br>
happens but I suspect that the reason it does not embed in other cases<br>
is because they are using a overly simplified regular expression to<br>
match jsFiddle URLs. These details may not be to interesting to you but<br>
I would like to pose the independent question as to what regular<br>
expression does match a jsFiddle URL taking into account all the<br>
features a jsFiddle may have:<br>
<br>
    * anonymous fiddles (no user)<br>
    * characters encoding the jsFiddle ID<br>
    * jsFiddle versions<br>
    * stylesheets<br>
    * show<br>
    * default embed with no tabs specified<br>
    * embed with tabs specified.<br>
    * dependancies<br>
<br>
Here is my crude attempt to write a regexp for a jsFiddle URL with<br>
various capturing parentheses tossed in:<br>
<br>
/<br>
  (jsfiddle\.net\/)<br>
  ([a-zA-Z0-9]\/)?<br>
  ([a-zA-Z0-9]\/)<br>
  (show\/|embedded\/((html|css|<u></u>js|resources|result){0,5}\/([<u></u>a-zA-Z0-9])?\/)?<br>
/<br>
<br>
I have no idea what characters are allowed for the jsFiddle ID or user<br>
names so I just specified alphanumerics. Also I overlooked version<br>
numbers, & dependancies when I typed this regexp. Moreover I never<br>
tested it.<br>
<br>
So if someone wants a challenge I would like to find the regexp that<br>
matches all jsFiddle URLs without getting too anal. The key area is<br>
focus on is the embedded path which can contain tabs (and you apparently<br>
can list a tab twice) because the whole goal of embedly is to embed the<br>
jsFiddle URL in an iframe on blog or cms.<br>
<br></div></div>
My overall goal is to get <a href="http://embed.ly" target="_blank">embed.ly</a> <<a href="http://embed.ly" target="_blank">http://embed.ly</a>> to support jsFiddle<div class="im"><br>
embeds and I will bird dog that issue but it would be a nice piece of<br>
information to have a regexp for matching any jsFiddle.<br>
<br>
<br>
<br>
<br></div><div class="im">
______________________________<u></u>_________________<br>
p2pu-dev mailing list<br>
<a href="mailto:p2pu-dev@lists.p2pu.org" target="_blank">p2pu-dev@lists.p2pu.org</a><br>
<a href="http://lists.p2pu.org/mailman/listinfo/p2pu-dev" target="_blank">http://lists.p2pu.org/mailman/<u></u>listinfo/p2pu-dev</a><br>
</div></blockquote><div><div></div><div class="h5">
<br>
______________________________<u></u>_________________<br>
p2pu-dev mailing list<br>
<a href="mailto:p2pu-dev@lists.p2pu.org" target="_blank">p2pu-dev@lists.p2pu.org</a><br>
<a href="http://lists.p2pu.org/mailman/listinfo/p2pu-dev" target="_blank">http://lists.p2pu.org/mailman/<u></u>listinfo/p2pu-dev</a><br>
</div></div></blockquote></div><br></div>