Adding inline JavaScript encoding issue
1) For escaping content of textarea you should use esc_textarea and not esc_attr. 2) You should not escape things when storing them in the DB, escaping should be done only at output time. (I assume that you can find an edge case in which it might be needed, but as a general rule, just don’t … Read more