#689 htmlspecialchars are filtered out in getMetadataValue now.

This commit is contained in:
tomas 2005-04-11 22:30:24 +00:00
parent 65e3f4440e
commit 50b03c28b1

View file

@ -23,7 +23,7 @@
Author : $Author: tomas $ Author : $Author: tomas $
Version : $Revision: 1.28 $ Version : $Revision: 1.29 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/MetaData.php,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/MetaData.php,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -202,6 +202,11 @@ class MetaData{
ORDER BY id ORDER BY id
"; ";
$all = $this->dbc->getAll($sql); $all = $this->dbc->getAll($sql);
$transTbl = get_html_translation_table();
$transTbl = array_flip($transTbl);
foreach($all as $i=>$v){
$all[$i]['value']=strtr($all[$i]['value'], $transTbl);
}
if(PEAR::isError($all)) return $all; if(PEAR::isError($all)) return $all;
return $all; return $all;
} }
@ -215,7 +220,10 @@ class MetaData{
*/ */
function setMetadataEl($mid, $value=NULL) function setMetadataEl($mid, $value=NULL)
{ {
if(!is_null($value)){ $value = htmlentities($value); } if(!is_null($value)){
$transTbl = get_html_translation_table();
$value = strtr($value, $transTbl);
}
$info = $this->dbc->getRow(" $info = $this->dbc->getRow("
SELECT parmd.predns as parns, parmd.predicate as parname, SELECT parmd.predns as parns, parmd.predicate as parname,
md.predxml, md.predns as chns, md.predicate as chname md.predxml, md.predns as chns, md.predicate as chname