JSFiddle - React, Tailwind, and code Playground
HTML
<pre></pre>
JavaScript
function femtoProtection(post) {
//return post; // uncomment to see behavior without protection
return post.replace(/</gi, '(');
}
function attack(post) {
$('pre').html(femtoProtection(post));
}
attack('</pre><img src=https://pbs.twimg.com/profile_images/638751551457103872/KN-NzuRl.png>');