Commit 2c87a3b3e60d7eb9cbd2e9cd5eb6df11394b9daa
1 parent
c32cc5ae
KTS-825: Escape entities in document or folder name in TitleColumn,
document view, and breadcrumbs. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5415 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
5 additions
and
5 deletions
lib/browse/BrowseColumns.inc.php
| ... | ... | @@ -107,14 +107,14 @@ class TitleColumn extends BrowseColumn { |
| 107 | 107 | |
| 108 | 108 | function renderFolderLink($aDataRow) { |
| 109 | 109 | $outStr = '<a href="' . $this->buildFolderLink($aDataRow) . '">'; |
| 110 | - $outStr .= $aDataRow["folder"]->getName(); | |
| 110 | + $outStr .= htmlentities($aDataRow["folder"]->getName(), ENT_NOQUOTES, 'UTF-8'); | |
| 111 | 111 | $outStr .= '</a> '; |
| 112 | 112 | return $outStr; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | function renderDocumentLink($aDataRow) { |
| 116 | 116 | $outStr = '<a href="' . $this->buildDocumentLink($aDataRow) . '" title="' . $aDataRow["document"]->getFilename().'">'; |
| 117 | - $outStr .= $aDataRow["document"]->getName(); | |
| 117 | + $outStr .= htmlentities($aDataRow["document"]->getName(), ENT_NOQUOTES, 'UTF-8'); | |
| 118 | 118 | $outStr .= '</a>'; |
| 119 | 119 | return $outStr; |
| 120 | 120 | } | ... | ... |
templates/kt3/standard_page.smarty
| ... | ... | @@ -104,9 +104,9 @@ |
| 104 | 104 | {if ($page->breadcrumbs !== false)} |
| 105 | 105 | {foreach item=aCrumb from=$page->breadcrumbs name=bc} |
| 106 | 106 | {if ($aCrumb.url) } |
| 107 | - <a href="{$aCrumb.url}">{$aCrumb.label}</a> | |
| 107 | + <a href="{$aCrumb.url}">{$aCrumb.label|escape}</a> | |
| 108 | 108 | {else} |
| 109 | - <span>{$aCrumb.label}</span> | |
| 109 | + <span>{$aCrumb.label|escape}</span> | |
| 110 | 110 | {/if} |
| 111 | 111 | {if (!$smarty.foreach.bc.last)} |
| 112 | 112 | » | ... | ... |