Trailing whitespace (after "=") is stripped, but the return value from<br>
base64:strip_spaces is not in the same format expected by<br>
base64:decode.<br>
<br>
example of the problem:<br>
<br>
------------------------------<div id=":kt" class="ii gt">----------------------------------------<br>
3> base64:decode("cXV1eA==").<br>
<<"quux">><br>
4> base64:decode("cXV1eA==\n").<br>
** exception error: no function clause matching base64:decode([61,"=Ae1VXc"],<br>
<br>
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,<br>
<br>
-1,-1,-1,-1,-1,-1,-1,-1,...},<br>
                                                               [])<br>
     in function  base64:decode/1<br>
----------------------------------------------------------------------<br>
<br>
more specifically to the internal api:<br>
----------------------------------------------------------------------<br>
7> base64:strip_spaces("foo==\n", []).<br>
[61,"=oof"]<br>
8> base64:strip_spaces("foo==", []).<br>
"==oof"<br>
----------------------------------------------------------------------<br>
<br>
patch attached.</div><br clear="all"><br>-- <br>Christopher Stelma<br><a href="mailto:chris@digsby.com">chris@digsby.com</a><br>