I've overridden notices/success.php
template file, modifying the content this way:
<?php foreach ( $messages as $message ) : ?>
<div class="woocommerce-message" role="alert">
<span>
<?php
echo wc_kses_notice( $message );
?>
</span>
<div onClick="alert('LOL')">TEST</div>
</div>
<?php endforeach; ?>
When I now load the page, the elements are all generated but my onClick is removed:
<div class="woocommerce-message" role="alert"> <span> Kontodetails erfolgreich geändert. </span><div>TEST</div></div>
Why is this happening and how can I keep my onClick in every div or span within this message?