Changeset - 9a492df56347
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 13 years ago 2012-10-25 00:04:37
ohnobinki@ohnopublishing.net
Fix qTips not appearing for certain courses because of partial XML underquoting.

Some courses which had ampersands in their titles would cause XML parsing errors in
the browser when trying to display the qTip, resulting in the qTip not showing
for those courses. This is because the qTip’s content is inserted as XHTML into
the document, so it needs to be doubly encoded.
1 file changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
inc/class.schedule.php
Show inline comments
 
@@ -766,13 +766,14 @@ class Schedule
 
				      else
 
					$title .= ' ';
 

	
 
				      $carret = '&#013;' . htmlentities("<br />");
 
				      $carret = '&#013;<br />';
 
				      echo '            <td rowspan="' . $rowspan[$dayLoop]
 
					. '" class="qTipCell ' . $single_multi . ' class' . $j
 
					. '" title="' . htmlentities($title, ENT_QUOTES) . $carret
 
					. 'Prof: ' . htmlentities($current_meeting->instructor_get(), ENT_QUOTES) . $carret
 
					. 'Room: ' . htmlentities($current_meeting->getLocation(), ENT_QUOTES) . $carret
 
                                        . 'Type: ' . htmlentities($current_meeting->type_get(), ENT_QUOTES) . $carret;
 
					. '" title="' . htmlentities(
 
                                          htmlentities($title, ENT_QUOTES) . $carret
 
                                          . 'Prof: ' . htmlentities($current_meeting->instructor_get(), ENT_QUOTES) . $carret
 
                                          . 'Room: ' . htmlentities($current_meeting->getLocation(), ENT_QUOTES) . $carret
 
                                          . 'Type: ' . htmlentities($current_meeting->type_get(), ENT_QUOTES) . $carret, ENT_QUOTES);
 

	
 
                                      $section_credit_hours = $section->credit_hours_get();
 
                                      if ($section_credit_hours >= 0)
 
@@ -780,7 +781,7 @@ class Schedule
 
                                          $credit_hours[$section->getSynonym()] = $section_credit_hours;
 
                                          $have_credit_hours = TRUE;
 

	
 
                                          echo 'Credits: ' . htmlentities($section_credit_hours, ENT_QUOTES) . $carret;
 
                                          echo htmlentities('Credits: ' . htmlentities($section_credit_hours, ENT_QUOTES) . $carret, ENT_QUOTES);
 
                                        }
 
                                      echo '">'
 
					. '<span class="course-title block">' . htmlentities($title) . '</span>' . PHP_EOL
0 comments (0 inline, 0 general)