validation - XHTML and code inside textareas -
on site of mine in textarea used submission, have code can appear along lines of following:
<textarea><p>text</p></textarea>
when validating (xhtml 1.0 transitional), error arises,
line 88 column 50 - error: document type not allow element "p" here
if not valid method, expected? workaround onload javascript event, seems needless. regardless doesn't affect output, i'd rather site validate.
is there reason you're trying put <p>
within <textarea>
? found out it's not valid. if it's display purposes (ie, showing code) should translated:
<textarea><p>text</p></textarea>
beyond validation issues, allowing arbitrary tags (which not encoded above) display can huge security issue. it's paramount make sure user supplied input has been sanitized before displayed.
Comments
Post a Comment