diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index b8246cd03531..8e2d8b1d87f7 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -3591,7 +3591,7 @@ nsContentUtils::CreateContextualFragment(nsIDOMNode* aContextNode, nsCOMPtr htmlDoc(do_QueryInterface(document)); PRBool bHTML = htmlDoc && !bCaseSensitive; - if (bHTML && nsContentUtils::GetBoolPref("html5.enable", PR_TRUE)) { + if (bHTML && nsContentUtils::GetBoolPref("html5.enable", PR_FALSE)) { // See if the document has a cached fragment parser. nsHTMLDocument is the // only one that should really have one at the moment. nsCOMPtr parser = document->GetFragmentParser(); diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index be3735980164..53113199a333 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -656,7 +656,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand, PRBool aReset, nsIContentSink* aSink) { - PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_TRUE); + PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_FALSE); if (aSink) { loadAsHtml5 = PR_FALSE; } @@ -1806,7 +1806,7 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace) return NS_ERROR_DOM_NOT_SUPPORTED_ERR; } - PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_TRUE); + PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_FALSE); nsresult rv = NS_OK; diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index 8132abeaa77b..9c005bd9d087 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -2733,3 +2733,6 @@ pref("mozilla.widget.disable-native-theme", true); // Enable/Disable the geolocation API for content pref("geo.enabled", true); + +// Enable/Disable HTML5 parser +pref("html5.enable", false);