diff --git a/include/class.format.php b/include/class.format.php index d4d2353..8385893 100644 --- a/include/class.format.php +++ b/include/class.format.php @@ -62,7 +62,9 @@ class Format { } function htmlchars($var) { - return is_array($var)?array_map(array('Format','htmlchars'),$var):htmlspecialchars($var,ENT_QUOTES); + //added with inspiration from http://osticket.com/forums/showthread.php?t=6678&highlight=utf8 + return is_array($var)?array_map(array('Format','htmlchars'),$var): utf8_decode(htmlspecialchars($var,ENT_QUOTES)); + //return is_array($var)?array_map(array('Format','htmlchars'),$var):htmlspecialchars($var,ENT_QUOTES); } diff --git a/include/class.ticket.php b/include/class.ticket.php index 89c2f79..52a6d87 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -608,7 +608,8 @@ class Ticket{ ',headers='.db_input($headers). //Raw header. ',source='.db_input($source). ',ip_address='.db_input($_SERVER['REMOTE_ADDR']); - + //added with inspiration from http://osticket.com/forums/showthread.php?t=6678&highlight=utf8 + $sql = utf8_decode($sql); if(db_query($sql) && ($msgid=db_insert_id())) { $this->setLastMsgId($msgid); $this->onMessage(); diff --git a/include/client/viewticket.inc.php b/include/client/viewticket.inc.php index 3dd4c80..cda6c7d 100644 --- a/include/client/viewticket.inc.php +++ b/include/client/viewticket.inc.php @@ -75,7 +75,7 @@ $dept=($dept && $dept->isPublic())?$dept:$cfg->getDefaultDept(); getAttachmentStr($msg_row['msg_id'],'M')?> - + isPublic())?$dept:$cfg->getDefaultDept(); - + isOverdue()) - + @@ -85,13 +85,13 @@ if($ticket->isOverdue())
Name:getName())?>getName()))?>
Email:
- Subject: getSubject())?> + Subject: getSubject()))?> - + @@ -119,7 +119,7 @@ if($ticket->isOverdue()) @@ -216,9 +216,9 @@ if(($resp=db_query($sql)) && ($notes=db_num_rows($resp))){
Assigned Staff:getName()):'- unassigned -'?>getName())):'- unassigned -'?>
Last Response:
Help Topic: getHelpTopic(); - echo Format::htmlchars($ht?$ht:'N/A'); +echo utf8_encode(Format::htmlchars($ht?$ht:'N/A')); ?>
- + - +
 -  posted by
@@ -241,7 +241,7 @@ if(($resp=db_query($sql)) && ($notes=db_num_rows($resp))){ 0){ ?> getAttachmentStr($msg_row['msg_id'],'M')?> -   +   getAttachmentStr($respID,'R')?> - + - +