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

Wrapping injected disable_animation script in CDATA to prevent XHTML/XML parser errors

This commit is contained in:
Dale Morgan 2020-12-01 11:26:32 +00:00
parent 30ec8c188d
commit 849ec3f26c

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;