For those late evenings when you just need a good cold URL encoded string….
ruleset a60x525 {
meta {
name "uri-escape"
description <<
uri-escape
>>
author "Mike Grace"
logging on
}
rule ehskahpeh {
select when pageview ".*"
pre {
restfulYql = "http://query.yahooapis.com/v1/public/yql?q=";
queryStatement = "select * from html where url='www.kynetx.com'";
finalThingy = restfulYql + uri:escape(queryStatement);
appender =<<
<h1>#{finalThingy}</h1>
>>;
}
{
append("body", appender);
}
}
}
- 11 movie reference
App run on example.com with bookmarklet
Get the bookmarklet to try it out yourself!
Gratuitous day 29 Grace face


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