You can put a newline in the album name, this breaks the returned data format from fetch-albums as you get the following which has a newline which could be empty or full...
#__GR2PROTO__
...
album.name.4=album02
album.title.4=Pretty
album.parent.4=0
album.perms.add.4=true
album.perms.write.4=true
album.perms.del_item.4=true
album.perms.del_alb.4=true
album.perms.create_sub.4=true
album.name.5=album05
album.title.5=Untitled
album.parent.5=4
album.perms.add.5=true
album.perms.write.5=true
album.perms.del_item.5=true
album.perms.del_alb.5=true
album.perms.create_sub.5=true
...
album_count=9
status=0
status_text=Fetch albums successful.
Posts: 16
Ha, it may be just me.. this c# code works it out...
while (CurrentPosition < KeyValue.Length)
{
string Key;
string Value;
try
{
Key = KeyValue.Substring(CurrentPosition, (KeyValue.IndexOf("=",CurrentPosition)-CurrentPosition));
CurrentPosition = KeyValue.IndexOf("=",CurrentPosition)+1;
Value = KeyValue.Substring(CurrentPosition, (KeyValue.LastIndexOf("n",KeyValue.IndexOf("=", CurrentPosition))-CurrentPosition));
CurrentPosition = KeyValue.LastIndexOf("n",KeyValue.IndexOf("=", CurrentPosition))+1;
ReturnData.Add(Key, Value);
}
catch
{
CurrentPosition = KeyValue.Length+1;
}
}
Posts: 16
Got it working now.. here is screenshot of my prototype...
<!-- BBCode Start --><IMG SRC="http://www.sytone.net/albums/album65/aaa.jpg"><!-- BBCode End -->
Posts: 1479
Now escaping newlines (1.3.2b26 and later). Thanks for the catch (this would have caused titles to be truncated in GR Java).