Conversation
Fydon
left a comment
There was a problem hiding this comment.
Thank you for taking the time to deal with all these issues.
widget_setup.js must be available at scripts/widget_setup.js for existing embeds of the ereader to continue to work.
| util.dedup( | ||
| searchStr | ||
| .replace(/[- .,;–—"“”'‘’`~!()|\\{}\[\]:<>/?*]+/g, " ") | ||
| .replace(/[- .,;–—"“”'‘’`~!()|\\{}[\]:<>/?*]+/g, " ") |
There was a problem hiding this comment.
According to eslint, it is not necessary to escape the [ character in this context.
| const locale = language || req.idpLang || 'en' | ||
|
|
||
| const urlWithoutEditing = `${util.getProtocol({ req })}://${req.headers.host}${req.originalUrl.replace(/([\?&])editing=1&?/, '$1').replace(/iniframe=1&?/, '').replace(/[\?&]$/, '')}` | ||
| const urlWithoutEditing = `${util.getProtocol({ req })}://${req.headers.host}${req.originalUrl.replace(/([?&])editing=1&?/, '$1').replace(/iniframe=1&?/, '').replace(/[?&]$/, '')}` |
There was a problem hiding this comment.
According to eslint, it is not necessary to escape the ? character in this context.
|
|
||
| // Split timestamp into [ Y, M, D, h, m, s, ms ] | ||
| var t = mysqlDatetime.split(/[- :\.]/) | ||
| var t = mysqlDatetime.split(/[- :.]/) |
There was a problem hiding this comment.
According to eslint, it is not necessary to escape the . character in this context.
|
|
||
| isValidEmail: email => { | ||
| const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ | ||
| const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ |
Edit: I was misunderstanding what this route was doing. I have since refactored it to be more sensible. |
|
I'm seeing this stack trace when running the Docker image: To investigate |
I fixed this and added a test. Please re-review. |
Fydon
left a comment
There was a problem hiding this comment.
Thank you. If you've validated that the regex checks haven't changed, I'm happy with these changes

.browser.jsextension, so it is linted correctly