hach unicode...

This commit is contained in:
Claude 2013-04-13 16:19:00 +02:00
parent 041b6d471f
commit e30e26a159

View File

@ -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 ;) //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'); include_once ('./application/libraries/finediff.php');
$from_text = htmlspecialchars_decode($row['raw']); $from_text = htmlspecialchars_decode(utf8_decode($row['raw']));
$to_text = htmlspecialchars_decode($data['raw']); $to_text = htmlspecialchars_decode(utf8_decode($data['raw']));
$opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, FineDiff::$wordGranularity); $opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, FineDiff::$wordGranularity);
$to_text = FineDiff::renderToTextFromOpcodes($from_text, $opcodes); $to_text = FineDiff::renderToTextFromOpcodes($from_text, $opcodes);
$data['paste'] = htmlspecialchars_decode($this->_format_diff(nl2br(FineDiff::renderDiffToHTMLFromOpcodes($from_text, $opcodes)))); $data['paste'] = htmlspecialchars_decode($this->_format_diff(nl2br(FineDiff::renderDiffToHTMLFromOpcodes($from_text, $opcodes))));