jQuery append function causes validation error. How to fix it?
append("<span>");
causes Document type does not allow element here
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It has nothing to do with jQuery, it’s the string in the script that is causing it.
If you are using XHTML, put CDATA tags in the script to keep it from breaking the validation:
Or if the XHTML is served with the content type text/html (which is common):