diff --git a/www/index.php b/www/index.php index 347755068619a6bc38411a4795b6580d285fd547..df56939006afcab4083d675dfd39608fb92835f7 100644 --- a/www/index.php +++ b/www/index.php @@ -61,13 +61,16 @@ if (!$isEmbed) { $page->head = '<link rel="home" href="./" />'; $page->pagetitle = ''; $page->breadcrumbs = renderTemplate('templates/breadcrumbs.tpl.php'); + $page->addStyleSheet('css/search.css?v=20161215'); +} + +if ($isEmbed && $_GET['embed'] === '5.0') { + $page->addStyleSheet('css/search-5.0.css?v=20180816'); } $localResults = ''; $context = ''; -$page->addStyleSheet('css/search.css?v=20161215'); - //u is referring site if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) { // Add local site search results @@ -77,7 +80,7 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) { //require_once 'HTMLPurifier.auto.php'; $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.SerializerPath', '/tmp'); - + //Trick the purifier into accepting HTML5 elements/attributes $config->set('HTML.DefinitionID', 'html5-definitions'); // unqiue id $config->set('HTML.DefinitionRev', 1); @@ -85,7 +88,7 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) { //Allow everything to have a role $def->addAttribute('*', 'role', 'Text'); } - + $purifier = new HTMLPurifier($config); $page->head .= '<link rel="home" href="'.htmlentities($_GET['u'], ENT_QUOTES).'" />'; diff --git a/www/templates/5.0/end-scripts.tpl.php b/www/templates/5.0/end-scripts.tpl.php index a8ae6a8faecb0dc935492b83f7de7c9bb8dcaca8..acf09933e461a1e6758dfd1cf00f3217a8a06a53 100644 --- a/www/templates/5.0/end-scripts.tpl.php +++ b/www/templates/5.0/end-scripts.tpl.php @@ -19,7 +19,7 @@ require(['jquery', '<?php echo $localScriptUrl ?>'], function($, UNLSearch) { }).appendTo($('body')); var $localCss = $('<link>', { - 'href': './css/search-google.css?v=20170404' + 'href': './css/search-google-5.0.css?v=20180816' }); gSearchDefer.done(function(google) {