From e30e26a15950a2478dbbfa5fc6a9e1b24d393b1c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Apr 2013 16:19:00 +0200 Subject: [PATCH] hach unicode... --- htdocs/application/models/pastes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/application/models/pastes.php b/htdocs/application/models/pastes.php index e17e519..3c51e45 100644 --- a/htdocs/application/models/pastes.php +++ b/htdocs/application/models/pastes.php @@ -239,8 +239,8 @@ class Pastes extends CI_Model //yes, I'm aware, two times htmlspecialchars_decode(). Needs to be, since it's saved that way in the DB from the original stikked author ages ago ;) include_once ('./application/libraries/finediff.php'); - $from_text = htmlspecialchars_decode($row['raw']); - $to_text = htmlspecialchars_decode($data['raw']); + $from_text = htmlspecialchars_decode(utf8_decode($row['raw'])); + $to_text = htmlspecialchars_decode(utf8_decode($data['raw'])); $opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, FineDiff::$wordGranularity); $to_text = FineDiff::renderToTextFromOpcodes($from_text, $opcodes); $data['paste'] = htmlspecialchars_decode($this->_format_diff(nl2br(FineDiff::renderDiffToHTMLFromOpcodes($from_text, $opcodes))));