sdefresne / gerrit-monitor

Source for Gerrit Monitor Chrome extension
Apache License 2.0
21 stars 16 forks source link

properly escape regex err on options page #51

Open patrickkettner opened 1 year ago

patrickkettner commented 1 year ago

not the bug, but one that came up in #49.

pattern takes a regex, and ORIGIN_PATTERN has multiple unescaped /, so it is throwing

Pattern attribute value (https?://[^/]*)(/[^/]+)* is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /(https?://[^/]*)(/[^/]+)*/v: Invalid character in character class