1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Merge pull request #2428 from dmorgan-fa/disable_animation_xhtml_fix

Wrapping injected disable_animation script in CDATA to prevent XHTML/…
This commit is contained in:
Thomas Walpole 2020-12-02 12:39:37 -08:00 committed by GitHub
commit 8510765c68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,11 @@ module Capybara
end
DISABLE_MARKUP_TEMPLATE = <<~HTML
<script defer>(typeof jQuery !== 'undefined') && (jQuery.fx.off = true);</script>
<script defer="defer">
//<![CDATA[
(typeof jQuery !== 'undefined') && (jQuery.fx.off = true);
//]]>
</script>
<style>
%<selector>s, %<selector>s::before, %<selector>s::after {
transition: none !important;