tab-reloader icon indicating copy to clipboard operation
tab-reloader copied to clipboard

Saving loses escaped characters

Open madduck opened this issue 3 years ago • 3 comments

If I use a url field in a reload policy, such as:

  "example.com": {
    "url": "\/foo"
  }

then saving these rules will turn \/ into /, which means the regular expression actually won't match anymore.

Note that this is an issue of it's own, though my suggestions in #65 and especially #117 will also take care of this, and it might just be better to use the time there…

madduck avatar May 05 '22 01:05 madduck

how about \\/?

james-fray avatar May 09 '22 06:05 james-fray

Note that currently, the matching uses URLPattern matching, which is a bug. I just pushed a fix

james-fray avatar May 09 '22 06:05 james-fray

how about \\/?

Yes, that works, but it's even more confusing, and also unnecessary. When specifying regexps for URLs, / should not be a character you'd need to escape, let alone double-escape.

madduck avatar May 09 '22 22:05 madduck