+/**\r
+ * fullpage.js\r
+ *\r
+ * Copyright 2009, Moxiecode Systems AB\r
+ * Released under LGPL License.\r
+ *\r
+ * License: http://tinymce.moxiecode.com/license\r
+ * Contributing: http://tinymce.moxiecode.com/contributing\r
+ */\r
+\r
tinyMCEPopup.requireLangPack();\r
\r
var doc;\r
// Preprocess the HTML disable scripts and urls\r
h = h.replace(/<script>/gi, '<script type="text/javascript">');\r
h = h.replace(/type=([\"\'])?/gi, 'type=$1-mce-');\r
- h = h.replace(/(src=|href=)/g, 'mce_$1');\r
+ h = h.replace(/(src=|href=)/g, '_mce_$1');\r
\r
// Write in the content in the iframe\r
doc.write(h + '</body></html>');\r
// Parse xml and doctype\r
xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, h, 1);\r
xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1);\r
- docType = getReItem(/<\!DOCTYPE.*?>/gi, h, 0);\r
+ docType = getReItem(/<\!DOCTYPE.*?>/gi, h.replace(/\n/g, ''), 0).replace(/ +/g, ' ');\r
f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1);\r
\r
// Parse title\r
var m = l.getAttribute('media', 2) || '', t = l.getAttribute('type', 2) || '';\r
\r
if (t == "-mce-text/css" && (m == "" || m == "screen" || m == "all") && (l.getAttribute('rel', 2) || '') == "stylesheet") {\r
- f.stylesheet.value = l.getAttribute('mce_href', 2) || '';\r
+ f.stylesheet.value = l.getAttribute('_mce_href', 2) || '';\r
return false;\r
}\r
});\r
// Fix scripts without a type\r
nl = doc.getElementsByTagName('script');\r
for (i=0; i<nl.length; i++) {\r
- if (tinyMCEPopup.dom.getAttrib(nl[i], 'mce_type') == '')\r
- nl[i].setAttribute('mce_type', 'text/javascript');\r
+ if (tinyMCEPopup.dom.getAttrib(nl[i], '_mce_type') == '')\r
+ nl[i].setAttribute('_mce_type', 'text/javascript');\r
}\r
\r
// Get primary stylesheet\r
\r
tmp = tinyMCEPopup.dom.getAttrib(l, 'media');\r
\r
- if (tinyMCEPopup.dom.getAttrib(l, 'mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCEPopup.dom.getAttrib(l, 'rel') == "stylesheet") {\r
+ if (tinyMCEPopup.dom.getAttrib(l, '_mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCEPopup.dom.getAttrib(l, 'rel') == "stylesheet") {\r
addlink = false;\r
\r
if (f.stylesheet.value == '')\r
l.parentNode.removeChild(l);\r
else\r
- l.setAttribute('mce_href', f.stylesheet.value);\r
+ l.setAttribute('_mce_href', f.stylesheet.value);\r
\r
break;\r
}\r
l = doc.createElement('link');\r
\r
l.setAttribute('type', 'text/css');\r
- l.setAttribute('mce_href', f.stylesheet.value);\r
+ l.setAttribute('_mce_href', f.stylesheet.value);\r
l.setAttribute('rel', 'stylesheet');\r
\r
head.appendChild(l);\r