-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue_1356_1376_1388: Fixed escaping for copying #1389
Conversation
src/common/utils/helpers.ts
Outdated
transformedText = beforeFirstDoubleQuote + insideOfDoubleQuotes + afterLastDoubleQuote; | ||
} | ||
|
||
return transformedText; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, create unit tests for this function
src/common/utils/helpers.ts
Outdated
.replace(/=\\'\\3/g, "=\\'\\\\3") // two different cases for \\3 to avoid affecting something else... | ||
.replace(/\\/g, "\\\\") | ||
.replace(/"/g, '\\"'); | ||
const transformedText = escapeLocator(text); | ||
chrome.devtools.inspectedWindow.eval(`copy('${transformedText}')`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please, create a new module for these two functions. They are more than just helpers from now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Thank you!
"
with'
in css locators, added escaping instead (1356)