I was recently trying to encode and decode and came across some code on stackoverflow gringo and was very surprised to try it out.
$("<textarea/>").html('<a>').val() // return '<a>'
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<textarea/>
I expected something like no element would be added to it and it would be just as empty, but it turns out that it adds the value of the script (and I don't know if it only happens in my firefox browser, but I don't think so).
I attached a screenshot in case it doesn't look the same: