Commit e6b305b
Properly escape JavaScript code on Android (#20366)
Summary:
These changes will fix executing javascript with any special characters, by making use of the `evaluateJavascript` function on Android 4.4+, and by properly escaping the URI on Android <4.4.
Fixes #19611 • Fixes #20365 • Fixes #9749 • Closes #19655 • Closes #12321
This PR supersedes #19655 by patching the same problem in all the places, and fixing it for Android <4.4 as well.
Pull Request resolved: #20366
Differential Revision: D9242968
Pulled By: hramos
fbshipit-source-id: f2e1abc786ba333dbd8aaa8922e716fd99ec26e01 parent 8ee9002 commit e6b305b
File tree
1 file changed
+21
-4
lines changed- ReactAndroid/src/main/java/com/facebook/react/views/webview
1 file changed
+21
-4
lines changedLines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
328 | 343 | | |
329 | 344 | | |
330 | 345 | | |
331 | 346 | | |
332 | | - | |
| 347 | + | |
333 | 348 | | |
334 | 349 | | |
335 | 350 | | |
| |||
348 | 363 | | |
349 | 364 | | |
350 | 365 | | |
351 | | - | |
| 366 | + | |
352 | 367 | | |
353 | 368 | | |
354 | 369 | | |
| |||
637 | 652 | | |
638 | 653 | | |
639 | 654 | | |
| 655 | + | |
640 | 656 | | |
641 | 657 | | |
642 | | - | |
| 658 | + | |
643 | 659 | | |
644 | 660 | | |
645 | 661 | | |
| |||
655 | 671 | | |
656 | 672 | | |
657 | 673 | | |
658 | | - | |
| 674 | + | |
| 675 | + | |
659 | 676 | | |
660 | 677 | | |
661 | 678 | | |
| |||
0 commit comments