Quantcast
Channel: Different HTML from inline and numbered Markdown links breaks links - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 2

Different HTML from inline and numbered Markdown links breaks links

$
0
0

I'm active in the SPARQL and DBPedia tags, so I have lots of opportunities to link to query results from the DBpedia SPARQL endpoint. If I have a query like the following (in which && appears), the link to the results is the following:

select * { ?x rdfs:label ?label . filter ( strlen(?label) = 5 && strlen(?label) = 5 ) } limit 1
http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=select+*+%7B+%3Fx+rdfs%3Alabel+%3Flabel+.+filter+%28+strlen%28%3Flabel%29+%3D+5+%26%26+strlen%28%3Flabel%29+%3D+5+%29+%7D+limit+1&format=text%2Fhtml&timeout=30000&debug=on

Using the [...](...) link notation, I can make link with that URL that works without a problem. However, if I use the [...][2] ... [1]: ... notation that's generated by using Control-L, the link doesn't take me to the query results, but rather to a syntax error about unbalanced parentheses.

bracket-parenthesis link
numbered link

The generated HTML source is:

<p><a href="http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&amp;query=select+%2a+%7B+%3Fx+rdfs%3Alabel+%3Flabel+.+filter+%28+strlen%28%3Flabel%29+%3D+5+%26%26+strlen%28%3Flabel%29+%3D+5+%29+%7D+limit+1&amp;format=text%2Fhtml&amp;timeout=30000&amp;debug=on" rel="nofollow">bracket-parenthesis link</a><br><a href="http://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&amp;query=select%20%2a%20%7B%20?x%20rdfs%3alabel%20?label%20.%20filter%20%28%20strlen%28?label%29%20=%205%20&amp;&amp;%20strlen%28?label%29%20=%205%20%29%20%7D%20limit%201&amp;format=text/html&amp;timeout=30000&amp;debug=on" rel="nofollow">numbered link</a></p>

Pulling the links from there, we can see that the URLs in the HTML source are different:

http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&amp;query=select+%2a+%7B+%3Fx+rdfs%3Alabel+%3Flabel+.+filter+%28+strlen%28%3Flabel%29+%3D+5+%26%26+strlen%28%3Flabel%29+%3D+5+%29+%7D+limit+1&amp;format=text%2Fhtml&amp;timeout=30000&amp;debug=onhttp://dbpedia.org/sparql?default-graph-uri=http://dbpedia.org&amp;query=select%20%2a%20%7B%20?x%20rdfs%3alabel%20?label%20.%20filter%20%28%20strlen%28?label%29%20=%205%20&amp;&amp;%20strlen%28?label%29%20=%205%20%29%20%7D%20limit%201&amp;format=text/html&amp;timeout=30000&amp;debug=on

Shouldn't they be the same?

Related, but not the same


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images