Skip to content
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

[java] removed the broken escape #11110

Merged
merged 1 commit into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions java/src/org/openqa/selenium/remote/RemoteWebDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,6 @@ public Object executeScript(String script, Object... args) {
"You must be using an underlying instance of WebDriver that supports executing javascript");
}

// Escape the quote marks
script = script.replaceAll("\"", "\\\"");

List<Object> convertedArgs = Stream.of(args).map(new WebElementToJsonConverter()).collect(
Collectors.toList());

Expand All @@ -488,9 +485,6 @@ public Object executeAsyncScript(String script, Object... args) {
"WebDriver that supports executing javascript");
}

// Escape the quote marks
script = script.replaceAll("\"", "\\\"");

List<Object> convertedArgs = Stream.of(args).map(new WebElementToJsonConverter()).collect(
Collectors.toList());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,6 @@ private List<String> stringToUtf8Array(String toConvert) {
}

private Map<String, ?> toScript(String script, Object... args) {
// Escape the quote marks
script = script.replaceAll("\"", "\\\"");

List<Object> convertedArgs = Stream.of(args).map(new WebElementToJsonConverter()).collect(
Collectors.toList());

Expand Down