Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

Base64 encoding as used in %%IMG datablocks in Decker uses digits, upper- and lower-case letters, and the symbols +, /, and =.

URL encoding leaves digits and letters unchanged, but reads + as a space and / is technically reserved. If I open web-decker with a URL like:

http://beyondloom.com/decker/tour.html?i=a1+/b2

app.params comes out as

{"i":"a1 /b2"}

If I instead encode that + and / with the appropriate percent-codes:

http://beyondloom.com/decker/tour.html?i=a1%2b%2fb2

I get the intended payload:

{"i":"a1+/b2"}

I think this explains the behavior you're seeing; your image-string is getting scrambled before you try to decode it.

Here's one way to encode those special characters- and other reserved chars, too- if you're using a Lil script to assemble the URL:

on url_escape x do
 a:"" split " !#$&'()*+,/:;=?@[]"
 b:3 window "%20%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D"
 rtext.string[rtext.replace[x a b]]
end

If you're exclusively pasting Decker image strings into URL parameters I guess it might also work to translate spaces back into + before decoding?

How's that?

(+2)

Exactly what I needed - thank you!