summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Walker2005-02-17 04:09:06 (GMT)
committerJames Walker2005-02-17 04:09:06 (GMT)
commita8e806a8992a4f7571083fe39b1512d508509f07 (patch)
treeaa1294da06725b828b5bd71702286527187bd6ce
parent57ec06e3f5be693a5f71e305897cfb4010cc38eb (diff)
add missing <script> tags when G2 includes javascript.
Patch by tdobes (closes #16928 )
-rw-r--r--gallery.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/gallery.module b/gallery.module
index b6c86c4..39fdb5b 100644
--- a/gallery.module
+++ b/gallery.module
@@ -207,7 +207,9 @@ function gallery_page() {
if (!$result['isDone']) {
list($title, $css, $javascript) = GalleryEmbed::parseHead($result['headHtml']);
- drupal_set_html_head(implode("\n",$javascript));
+ if (!empty($javascript)) {
+ drupal_set_html_head('<script type="text/javascript">'. implode("\n",$javascript) .'</script>');
+ }
drupal_set_html_head(implode("\n",$css));
// hack to cleanup matrix when embedded
drupal_set_html_head('<style type="text/css">#gsAlbumContents, #gsOtherContents { width : 98%; }</style>');