Home forums Report Bugs Minor regex issue

Tagged: 

This topic contains 4 replies, has 3 voices, and was last updated by  Bivek Singh 1 month, 3 weeks ago.

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

    Rob
    Member
    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

    Suyash Singh
    Moderator

    @sangoma,

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

    ___
    Suyash Singh
    Team CanvasJS

    #15273

    Rob
    Member

    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

    Bivek Singh
    Moderator

    @sangoma,

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

    —-
    Bivek Singh

    #15375

    Bivek Singh
    Moderator

    @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.