Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Escape variables in visualize module
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Dec 8, 2014
1 parent df91359 commit ae6ea89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions modules/visualize/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ public function getItemViewLink($params)
if ($this->ModuleComponent->Main->canVisualizeWithSliceView($item)) {
$webroot = Zend_Controller_Front::getInstance()->getBaseUrl();
$html = '<li><a href="'.$webroot.'/'.$this->moduleName.'/paraview/slice?itemId=';
$html .= $item->getKey().'"><img alt="" src="'.$webroot.'/modules/';
$html .= htmlspecialchars($item->getKey(), ENT_QUOTES, 'UTF-8').'"><img alt="" src="'.$webroot.'/modules/';
$html .= $this->moduleName.'/public/images/sliceView.png" /> Slice Visualization</a></li>';

$html .= '<li><a href="'.$webroot.'/'.$this->moduleName.'/paraview/volume?itemId=';
$html .= $item->getKey().'"><img alt="" src="'.$webroot.'/modules/';
$html .= htmlspecialchars($item->getKey(), ENT_QUOTES, 'UTF-8').'"><img alt="" src="'.$webroot.'/modules/';
$html .= $this->moduleName.'/public/images/volume.png" /> Volume Visualization</a></li>';

return $html;
} elseif ($this->ModuleComponent->Main->canVisualizeWithSurfaceView($item)
) {
$webroot = Zend_Controller_Front::getInstance()->getBaseUrl();
$html = '<li><a href="'.$webroot.'/'.$this->moduleName.'/paraview/surface?itemId=';
$html .= $item->getKey().'"><img alt="" src="'.$webroot.'/modules/';
$html .= htmlspecialchars($item->getKey(), ENT_QUOTES, 'UTF-8').'"><img alt="" src="'.$webroot.'/modules/';
$html .= $this->moduleName.'/public/images/pqUnstructuredGrid16.png" /> Surface Visualization</a></li>';

return $html;
Expand Down
2 changes: 1 addition & 1 deletion modules/visualize/views/image/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/jquery/iviewer/
<div class="wrapper">
<div id="viewer" class="viewer"></div>
</div>
<div id='urlImage' style="display:none;"><?php echo $this->imageUrl ?></div>
<div id='urlImage' style="display:none;"><?php echo $this->escape($this->imageUrl); ?></div>
<?php
echo $this->headScript();
6 changes: 3 additions & 3 deletions modules/visualize/views/wrapper/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ $this->headScript()->appendFile($this->webroot.'/modules/visualize/public/js/wra
<?php
foreach ($this->sameLocation as $item) {
echo "<li>";
echo "<a class='linkedcontentLink' preview='{$item->preview}' element='{$item->getKey(
)}' href='{$this->webroot}/item/{$item->getKey()}'>".$this->slicename(
$item->getName(),
echo "<a class='linkedcontentLink' preview='{$item->preview}' element='{$this->escape($item->getKey(
))}' href='{$this->webroot}/item/{$this->escape($item->getKey())}'>".$this->slicename(
$this->escape($item->getName()),
45
)."</a>";
echo "</li>";
Expand Down

0 comments on commit ae6ea89

Please sign in to comment.