• Hello,

    I am using the Rebble Agenda app and I noticed some weird artefacts (see attachment, event name redacted for privacy).

    After further investigation, I saw that the artefacts actually come from the android.calendar.json file provided from Gadgetbridge.

    Here is an example of an event with such artefacts:

    {t:"calendar",id:85,type:0,timestamp:171­1371600,durationInSeconds:3600,title:"re­dacted",description:"-::~:~::~:~:~:~:~:~­:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~­:~:~:~:~:~:~:~:~:~:~::~:~::-\nParticiper­ via Google\xA0Meet\xA0: https://meet.google.com/redacted\nOu composez le\xA0: (FR) redacted Cod...",location:"",calName:"redacted",c­olor:-6299161,allDay:false}
    

    It looks like events that come from Google Workspace with a Google Meet invitation include some weird -::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:­~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:­:~:~::- separators that completely mess up the UI.

    Another event is difficult to read because it has HTML tags in it:

    description:"<html-blob><u></u><u></u><u­></u><p><b>redacted &nbsp;</b>redacted</p><p><b><br></b></p>­<p><u><b>redacted&...
    

    Would it be possible to "sanitize" this data coming from Gadgetbridge, maybe using a regex to remove HTML tags and separators?

    It would subsequently fix all the apps that require the JSON file.

    Thanks


    1 Attachment

    • IMG_20240321_233524~2.jpg
  • Yes, that sounds like a good idea. It's something that would need to be done inside Gadgetbridge though.

    I'll take a look and see how easy it is to get rid of stuff like that - however if Google change the format of invites then we'll probably have to change the regex again to try and strip them out.

  • Ok, I've just added some code, so tomorrow the Gadgetbridge nightlies should have the fix in.

    I believe the HTML and :~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~ should now be stripped out

  • Great, thanks. I will test tomorrow and report back.

  • So I added the Gadgetbridge nightly repo on F-Droid, but the BangleJS Gadgetbridge Nightly app says "updated 4 days ago".

    Latest version is 0.79.1-banglejs-717bc3035 and it does not include your fix

  • I downloaded the APK directly from the website and it works! Thanks

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Sanitize the calendar data coming from Gadgetbridge?

Posted by Avatar for Pologram @Pologram

Actions