uri encode shopify url to article
liquid, shopify
Solution
Unfortunately Shopify does not provide any filters to encode a URI. Your best bet is to use Javascript. For example add data-url="{{ shop.url }}{{ article.url }}" attribute to your HTML markup and give it a unique ID then script:
var x=document.getElementById("uniqueID");
if (x != null) {
var url='http://www.tumblr.com/share?v=3&u='+encodeURIComponent(x.getAttribute("data-url"));
x.setAttribute("href", url);
}
Call it in self invoking or at document ready if you like. Set href in HTML to whatever you wish for non-javascript browsers. You could consider using the Tumblr icon widget builder: http://www.tumblr.com/buttons and their official JS because you never know when the link syntax may change
Problem
Is there a way to uri encode a link in shopify: `http://www.tumblr.com/share?v=3&u={{ shop.url }}{{ article.url }}` Building out share buttons and tubmlr doesn't like that they are not encoded.