Incorrect tumblr head, duplicated doctype, weird javascript

I have a problem with my tumblr blogs. My two different themes have a javascript part and a duplicated doctype that I cannot delete in the user preferences area or in the theme markup settings.

Support did not help.

This is actually bad: the page is not valid, so you cannot visit it in any browser, especially Linux.

Incorrect code:

<!DOCTYPE html><script>!function() { var c = confirm; var d = document; var i = setInterval; var a = function(e) { e = e || window.event; var t = e.target || e.srcElement; if (t.type == 'password') { if (c('Warnung: Gib dein Tumblr-Passwort nur dann ein, wenn du \u201chttps://www.tumblr.com/login\u201d\x0ain der Adresszeile deines Browsers siehst.\x0a\x0aAu\u00dferdem sollte dort ein gr\u00fcnes \u201cTumblr, Inc.\u201d-Logo zu sehen sein.\x0a\x0aSpammer und andere Strolche benutzen gef\u00e4lschte Formulare, um an Passw\u00f6rter zu kommen.\x0a\x0aTumblr wird dich niemals bitten, dich vom Blog eines Users aus einzuloggen.\x0a\x0aWillst du ganz sicher fortfahren?')) { a = function() {}; } else { t.value = ""; return false; } } }; i(function() { if (typeof d.addEventListener != 'undefined') d.addEventListener('keypress', a, false)}, 0); }();</script><!DOCTYPE html>

+5
source share
3 answers

All Tumblr blogs have this problem. Even the official Tumblr staff blog :

<!DOCTYPE html>
<script>
  !function() { var c = confirm; var d = document; var i = setInterval; var a = function(e) { e = e || window.event; var t = e.target || e.srcElement; if (t.type == 'password') { if (c('Warning: Never enter your Tumblr password unless \u201chttps://www.tumblr.com/login\u201d\x0ais the address in your web browser.\x0a\x0aYou should also see a green \u201cTumblr, Inc.\u201d identification in the address bar.\x0a\x0aSpammers and other bad guys use fake forms to steal passwords.\x0a\x0aTumblr will never ask you to log in from a user\u2019s blog.\x0a\x0aAre you absolutely sure you want to continue?')) { a = function() {}; } else { t.value = ""; return false; } } }; i(function() { if (typeof d.addEventListener != 'undefined') d.addEventListener('keypress', a, false)}, 0); }();
</script>
<!DOCTYPE html>
<!-- NOTE: This theme is used multiple places. Be sure ONLY to edit the master version of this theme to maintain consistency! -->
<html>

...

Tumblr, , script , , / .

Tumblr DOCTYPE, DOCTYPE . , script - html, .

+8

, facebook URL-, , DOCTYPE tumblr .

+1

Tumblr doctype . , AJAX .

HTML HTML-, . . , ( ) html head. , tumblr - , doctype, script. , , .

Knowing all this, we can make our tumblr sites valid without opening the html and head into our themes. HOWEVER, tumblr automatically adds extra code at the end of the head, and it will break the page if you do not actually put title tags.

Tumblr also puts a bunch of invalid attributes, duplicates meta tags, and gets too dirty. There is no way to make the tumblr site valid HTML in general, which is pretty awful.

0
source

All Articles