-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #6960 Beacon script can be injected multiple times when there are…
… multiple </body> in the page. (#7231) Co-authored-by: Michael Lee <[email protected]>
- Loading branch information
1 parent
83f80bb
commit 426d736
Showing
4 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/double_body_tag.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html> | ||
<head> | ||
<title>Test</title> | ||
</head> | ||
<body> | ||
<iframe srcdoc=" | ||
<!DOCTYPE html> | ||
<html lang='en'> | ||
<head> | ||
<meta charset='UTF-8'> | ||
<meta name='viewport' content='width=device-width, initial-scale=1.0'> | ||
<title>Iframe Content</title> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>Iframe Header</h1> | ||
</header> | ||
</body> | ||
</html> | ||
" width="600" height="400" style="border:none;"></iframe> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
...s/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_double_body_tag.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html> | ||
<head> | ||
<title>Test</title> | ||
</head> | ||
<body> | ||
<iframe srcdoc=" | ||
<!DOCTYPE html> | ||
<html lang='en'> | ||
<head> | ||
<meta charset='UTF-8'> | ||
<meta name='viewport' content='width=device-width, initial-scale=1.0'> | ||
<title>Iframe Content</title> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>Iframe Header</h1> | ||
</header> | ||
</body> | ||
</html> | ||
" width="600" height="400" style="border:none;"></iframe> | ||
<script>var rocket_beacon_data = {"ajax_url":"http:\/\/example.org\/wp-admin\/admin-ajax.php","nonce":"96ac96b69e","url":"http:\/\/example.org","is_mobile":false,"width_threshold":1600,"height_threshold":700,"delay":500,"debug":false,"status":{"atf":true,"lrc":true},"elements":"img, video, picture, p, main, div, li, svg, section, header, span","lrc_threshold":1800}</script><script data-name="wpr-wpr-beacon" src='http://example.org/wp-content/plugins/wp-rocket/assets/js/wpr-beacon.min.js' async></script></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters