Error: document type does not allow element "link" here

hass - December 26, 2006 - 01:16
Project:Auto Time Zone
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

this is my line 11:

if (!(offset == -60)) {document.write('<link rel="stylesheet" type="text/css" href="/drupal/index.php?q=autotimezone/' + offset + '" />')};

This bug has been found with SGML Parser in FF HTML Tidy (http://users.skynet.be/mgueury/mozilla/)

The following article will be helpfull - how to fix - this bug: http://drupal.org/node/104793

#1

LukeLast - December 31, 2006 - 14:45

This is one side effect of using this javascript css link method.

#2

hass - January 2, 2007 - 17:27

But you are able to fix this, see my feature request http://drupal.org/node/104793. This will fix the problem and is used in drupal core, too!

#3

LukeLast - January 2, 2007 - 23:21
Status:active» fixed

Wow, your right that works.
Good work!

#4

Anonymous - January 16, 2007 - 23:32
Status:fixed» closed

#5

hass - January 21, 2007 - 10:58
Status:closed» active

i'm sorry, i must reopen the bug. i told you about a function that is already build in drupal and i haven't seen. it is named drupal_to_js(); and this seems to be the API way you should go...

#6

LukeLast - May 31, 2007 - 15:46
Version:4.7.x-1.x-dev» 5.x-1.x-dev
Status:active» closed

I added some drupal_to_js calls although they don't really do anything.

 
 

Drupal is a registered trademark of Dries Buytaert.