Home forums Report Bugs Minor regex issue


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

    if (typeof (Blob) !== "undefined" && !!new 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



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

    Suyash Singh
    Team CanvasJS



    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



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

    Bivek Singh



    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.