Skip to content

Double quotes inside SQL strings cause crashes #6

@AndreaSpinelli

Description

@AndreaSpinelli

Hi, cute piece of software!

The following code crashes:

var sql = 'insert into foo (bar) values ('baz " biz') ; insert into foo (bar) values ('barbaz');
html5sql.process(sql, function() {});

Trying to debug, I found that at line 99 of html5sql.js the input string is split in two, and the splice on line 102 is executed repeatedly, until i+1 goes outside the array and the program crashes.

I guess that the split at line 95 must be substituted by something more complex.

Thanks in advance for your attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions