JSFiddle - React, Tailwind, and code Playground

HTML

<div id="modal">
   <div class="header_buttons"></div>
   <p> 
       Are you sure you would like to perform <%= action_name %> 
       on <%= count %> objects?
   </p>
   <div class="footer_buttons">
        <button>Do <%= action_name %></button>
   </div>
</div>

JavaScript

console.log(
    $("#modal").html().replace(/&lt;%=/g, '<%=').replace(/%&gt;/g, '%>')
);