Not escaping for regex in "search node"

  1. Not escaping in regex
  • try typing a ‘+’ in the “search nodes” box.

  • observe error in dev tools log: Uncaught SyntaxError: Invalid regular expression: /+/: Nothing to repeat

    at file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:263314:20
    at Array.reduce (native)
    at findChunks (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:263307:7)
    at findAll (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:263248:18)
    at Highlighter (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:263091:50)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:24100:15)
    at ReactCompositeComponentWrapper._constructComponent (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:24076:20)
    at ReactCompositeComponentWrapper.mountComponent (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:23979:22)
    at Object.mountComponent (file:///opt/XOD%20IDE/resources/app.asar/src-babel/bundle.js:16329:36)

  • Presumably interpolating into a regex without escaping

Nice catch! Thanks. Issued it at https://github.com/xodio/xod/issues/810

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.