Home Forums Report Bugs Minor regex issue

Minor regex issue

Viewing 5 posts - 1 through 5 (of 5 total)
  • #15165

    Rob
    if (typeof (Blob) !== "undefined" && !!new Blob()) {
        //alert("blob");
        var imgData = img.replace(/^data:[a-z\/]*;base64,/, ''); // This line needs the \ added to the regexp  
    
        var byteString = atob(imgData);
        var buffer = new ArrayBuffer(byteString.length);

    Having a separator inside a grouping is undefined, and may or may not work. Adding the backslash fixes it right up.

    This is line 1560 of canvasjs.js

    #15180

    @sangoma,

    Thanks for the suggestion. I will discuss this with the team members and make changes if necessary.

    ___
    Suyash Singh
    Team CanvasJS

    #15273

    Rob

    I just noticed, this is still present.

    This is NOT a valid regex, and is working only through javascript compilers trying to figure out what you MEAN, rather than what you SAY.

    It’s on line 1587 of version 1.9.8.1

    #15286

    @sangoma,

    Thank you for pointing it out. This will be resolved in the next release.

    —-
    Bivek Singh

    #15375

    @sangoma,

    We have fixed this in the latest version. Please download the latest build.

    —-
    Bivek Singh,
    Team CanvasJS

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.