jeromegn/Backbone.localStorage

Regex error on _clear method

Closed this issue · 0 comments

Converse.js create name with b64_sha1 library, which allows complete name property with logical regex character, like image below.

image

I fix this escaping name property in RegExp creation, like this:

backbone.browserStorage.js +159

  itemRe = new RegExp("^" + this.name.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + "-");