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.
Not sure if it was recently added, but url_param_escape seems to do exactly what you want. This worked for me:
{{ shop.url | append: article.url | url_param_escape }}
My crude attempt is as follows:
{{ article.url | replace: ' ', '%20' | replace: '&', '%26' | replace: '?', '%3F' | replace: '!', '%21' | replace: ',', '%2C' | replace: "'", "%27" }}
and so on. I haven't mastered the art of writing liquid functions yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With