In any CMS based site after my work in future client or any client's staff (non-technical) will update website through WYSIWYG editor and it's surely possible they could use deprecated tag or any non-semantic and non validated code. so in this condition would it be better to use transtional doctype over strict for CMS based site?
views:
132answers:
4Depending on the text editor engine used in your CMS, it may generate both invalid transitional markup as valid strict markup. For instance, if you use TinyMCE for text editing, it generates quite good HTML. If you use plain iframe with designMode enabled, it generates a real HTML mess out of it in Internet Explorer. So I'd say, WYSIWIG controls is not a good criteria for deciding if to use transitional or strict markup.
Use HTML5 doctype. Just
<!DOCTYPE html>
WYSIWYG editors must not make errors, but HTML5 will perform normally and validate when XHTML Strict will fail.
I'm sure the will find a way to break the validation of any doctype. so you shouldn't care about this. here is a good explanation http://www.oreillynet.com/lpt/a//javascript/synd/2001/08/28/doctype.html
if you want a "safe" markup. enrich your backend form. dont just give them a plain textarea. provide image upload functionality. distinct input fields for heading, subheading, dates ect. Maybe even do a switch to markdown (if the user dont know html anyway)? that will lower the risk of a broken markup much more rather then choosing the most forbearing doctype.
We use a strict doctype for our Sitecore 6 site. By default, Sitecore won't publish items that contain invalid html (rich text) fields, and you can limit the buttons/options available in the WYSIWYG mode.