Applescript, encoding URLS, and smart rules

Ar, I’ve just seen it:

end performSmartRule needs to go after end tell rather than after end urlencode