Day 29 – URL Encode Strings

For those late evenings when you just need a good cold URL encoded string….

ruleset a60x525 {
  meta {
    name "uri-escape"
    description <<
    author "Mike Grace"
    logging on

  rule ehskahpeh {
    select when pageview ".*"
    pre {
      restfulYql = "";
      queryStatement = "select * from html where url=''";
      finalThingy = restfulYql + uri:escape(queryStatement);
      appender =<<
      append("body", appender);
  • 11 movie reference

App run on with bookmarklet

Get the bookmarklet to try it out yourself!

Gratuitous day 29 Grace face

This entry was posted in Kynetx. Bookmark the permalink.

One Response to Day 29 – URL Encode Strings

  1. SS says:

    Is there an equivalent uri:unescape function ? (doesn’t seem to work – but hoping there is one by another name).
    PS: Thanks for a wonderful series btw. Given the somewhat patchy official documentation – your blog is a lifeline of KRL syntax and options (more like an (un)official cookbook 🙂 )

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s