It depends on how you load it into textarea . If you do this on the server side through simple string concatenation, for example. in php,
$output = '<textarea>' + $markdown + '</textarea>';
... then there is absolutely a risk, because this markdown can very easily close textarea and insert whatever it wants. If you use any component structure (for example, ASP.NET), then you must be protected if you use a safe API method, for example, MyTextArea.Value = markdown; .
If you do this on the client side, it also depends on how you do it. You would be safe if you used something like jQuery .val() setter, but you could still expose yourself to XSS vulnerabilities using other approaches.
In short, the general answer is yes, depending on how you actually create and fill in the textarea .
source share