Welcome! » Log In » Create A New Profile

Using HTML5 !DOCTYPE HTML

Posted by Square1 
Using HTML5 !DOCTYPE HTML
February 01, 2012 12:56AM

Hi there:

I am new to all of this and am not catching on too quickly! My first question...is using the simple HTML5 "!DOCTYPE HTML " not allowed with HTML PURIFIER?

Second question...

If the stand alone version does everything the full version does but runs quicker, why offer the full version at all? Why not just offer the stand alone?

Thanks!

Re: Using HTML5 !DOCTYPE HTML
February 01, 2012 01:11AM

Doctypes are stripped out, because we don't support whole document validation. We technically don't support HTML5 either.

The standalone version loads quicker, because everything is in one file so PHP only needs to load it once. But this is more annoying for development because you get line numbers in the tens of thousands.

Re: Using HTML5 !DOCTYPE HTML
February 01, 2012 08:05AM

I apologize but I don't understand your answer. Are you saying that the DOC TYPE doesn't matter (even though it is specified what is acceptible)? Or that is it or isn't OK the use !DOCTYPE HTML?

Re: Using HTML5 !DOCTYPE HTML
February 01, 2012 10:24AM

Doc type does matter, but that is something you, the person writing the entire webpage, specify, not the user submitting HTML to HTML Purifier.

Re: Using HTML5 !DOCTYPE HTML
February 01, 2012 10:34AM

I understand that. But you have a list of accepted DOC TYPES listed on the install page. !DOCTYPE HTML is not among them. That leads me to think that I need to change the DOC TYPE on all the pages on my site from !DOCTYPE HTML to one on your list of accepted DOC TYPES. At this point I am still not sure if I can leave it as the simple HTML5 DOC TYPE !DOCTYPE HTML or need to change all my pages.

Re: Using HTML5 !DOCTYPE HTML
February 01, 2012 04:24PM

!DOCTYPE HTML indicates HTML5. HTML Purifier does not support HTML5. So it is safest not to use that doc type. However, there is reasonable evidence that HTML4 is a subset of HTML5, and you might be OK in this case.

Re: Using HTML5 !DOCTYPE HTML
January 03, 2013 09:11AM

Is it okay to use HTMLPurifier4.4.0 for HTML5 (for standard HTML4 tags)? Coming a update for HTML5? :)

Re: Using HTML5 !DOCTYPE HTML
January 03, 2013 10:53AM

I think it would probably be OK. It would be nice if HTML Purifier had support for HTML5 proper but it will need a motivated individual to do it (not me.)

Re: Using HTML5 !DOCTYPE HTML
January 04, 2013 09:18AM

Oh, that's a shame to hear. Thanks for your great work so far. :)

Willex
Re: Using HTML5 !DOCTYPE HTML
August 26, 2017 06:54AM

Sorry for commenting here after this long time, but i'd like to know if it is now supported ? I don't see any evidence that it is...

Re: Using HTML5 !DOCTYPE HTML
August 26, 2017 03:02PM
Sorry, you do not have permission to post/reply in this forum.