Closed sintret closed 2 weeks ago
i have a code in ejs template like following
<script> submitForm('form-group', '', '/<%- routeName %>'); $(window).keydown(function(event){ if((event.keyCode == 13)) { var eltarget = $(event.target); if(eltarget.attr("type") == "input") { event.preventDefault(); return false; } } }); $(".divlayout_id ").hide(); $("#layouts").on("change", function(){ if($(this).val() == 4) { $(".divlayout_id ").show(); } else { $(".divlayout_id ").hide(); } }) <% var layout = data.layouts == "4" ? `$(".divlayout_id ").show();` : `$(".divlayout_id ").hide();` %> <%- layout%> </script>
Error in console log
v7.2.0
Chrome
https://github.com/terser/html-minifier-terser
<script>submitForm("form-group","","/<%- routeName %>"),$(window).keydown((function(t){if(13==t.keyCode&&"input"==$(t.target).attr("type"))return t.preventDefault(),!1})),$(".divlayout_id ").hide(),$("#layouts").on("change",(function(){4==$(this).val()?$(".divlayout_id ").show():$(".divlayout_id ").hide()}))</script> <% var layout = data.layouts == "4" ? `$(".divlayout_id ").show();` : `$(".divlayout_id ").hide();` %>,<%- layout%>
Yes
See https://github.com/terser/html-minifier-terser/issues/161#issuecomment-2452955381
What happened?
i have a code in ejs template like following
Error in console log
Version
v7.2.0
What browsers are you seeing the problem on?
Chrome
Link to reproduce
https://github.com/terser/html-minifier-terser
Relevant log output
Willing to submit a PR?
Yes