http://atutor.ca/atutor/mantis/view.php?id=4820
authorcindy li <cli@ocad.ca>
Thu, 25 Aug 2011 14:48:03 +0000 (14:48 -0000)
committercindy li <cli@ocad.ca>
Thu, 25 Aug 2011 14:48:03 +0000 (14:48 -0000)
docs/content.php
docs/include/lib/output.inc.php

index 9542789..5f4b365 100644 (file)
@@ -147,9 +147,7 @@ global $_custom_head;
 $_custom_head .= '
        <script language="javascript" type="text/javascript">
        //<!--
-       jQuery(function() {
-       jQuery(\'a.tooltip\').tooltip( { showBody: ": ", showURL: false } );
-       } );
+               jQuery(".tooltip").tooltip();
        //-->
        </script>
 ';
index c8c7270..1904163 100644 (file)
@@ -939,16 +939,16 @@ function format_content($input, $html = 0, $glossary, $simple = false) {
             $term = '(\s*'.$term.'\s*)';
                        $term = str_replace(' ','((<br \/>)*\s*)', $term); 
                        
-                       $def = htmlspecialchars($v, ENT_QUOTES, 'UTF-8');               
+                       // Uncomment the line below and comment the following line
+                       // when the jquery UI tooltip supports the html display.
+                       //$def = htmlspecialchars($v, ENT_QUOTES, 'UTF-8');
+                       $def = strip_tags($v);
                        if ($simple) {
                                $input = preg_replace
                                                ("/(\[\?\])$term(\[\/\?\])/i",
                                                '<a href="'.$simple.'glossary.html#'.urlencode($original_term).'" target="body" class="at-term">\\2</a>',
                                                $input);
-                       } else {/*
-                               $input = preg_replace
-                                               ("/(\[\?\])$term(\[\/\?\])/i",
-                                               '\\2<sup><a class="tooltip" href="'.$_base_path.'mods/_core/glossary/index.php?g_cid='.$_SESSION['s_cid'].htmlentities(SEP).'w='.urlencode($original_term).'#term" title="'.addslashes($original_term).': '.$def.'">?</a></sup>',$input);*/
+                       } else {
                                $input = preg_replace
                                                ("/(\[\?\])".$term."(\[\/\?\])/i",
                                                '<a class="tooltip" href="'.$_base_path.'mods/_core/glossary/index.php?g_cid='.$_SESSION['s_cid'].htmlentities(SEP).'w='.urlencode($original_term).'#term" title="'.htmlentities_utf8($original_term).': '.$def.'">\\2</a>',$input);