Hey @Jeff Burnz what would be the best way to add a no script tag to AdaptiveTheme? I'd ideally like to do it from a module. Was thinking something like:

 $element = array(
    '#tag' => 'link',
    '#attributes' => array(
      'href' => '../dist/theme-gcwu-fegc/css/theme-ns-min.css',
      'rel' => 'stylesheet',
    ),
    // Don't redirect if javascript is enabled. This is valid HTML5.
    '#prefix' => '<noscript>',
    '#suffix' => '</noscript>',
  );
  drupal_add_html_head($element, 'wetkit_wetboew_noscript');

However renders the </noscript> on a new line.

Comments

Jeff Burnz’s picture

Category: bug » support

The issue is with...

http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_html_...

which adds a new line to html_tag elements.

You can use type markup and push a string, not really a big deal unless you really do need that as structured data:

$element = array(
  '#type' => 'markup',
  '#markup' => '<link href="../dist/theme-gcwu-fegc/css/theme-ns-min.css" rel="stylesheet" />',
  '#prefix' => "<noscript>",
  '#suffix' => "</noscript>\n",
);
drupal_add_html_head($element, 'wetkit_wetboew_noscript');
sylus’s picture

Status: Active » Fixed

Thank u so much!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

add code tags