There is a tutorial on TutsPlus → https://code.tutsplus.com/articles/data-sanitization-and-validation-with-wordpress--wp-25536
Rule No. 4: Making Data Safe Is About Context
They says that this is completely a safe HTML
<textarea name="my-textarea"></textarea> Hello World
This is perfectly valid, and safe, HTML – however when you click save, we find that the text has jumped out of the textarea. The HTML code is not safe as a value for the textarea:
You can see later they contradict. However they have not provide reason why it was safe then how come in wordpress widget text area it becomes Unsafe and why and what the alternative method could be to make it safe.
I think they were trying to prove something that something may be correct in one place, but not in another.
they didn't give any explanation that If the data was safe then why does "hello world" came out of the form/box.
Can some one please help me to understand it thoroughly? Can some one show me How could that example be made safe?