mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 13:01:08 -05:00
htmlspecialchars hassle
This commit is contained in:
parent
da6858b211
commit
b92c64767f
@ -236,12 +236,14 @@ class Pastes extends CI_Model
|
|||||||
{
|
{
|
||||||
|
|
||||||
//diff
|
//diff
|
||||||
|
//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 = $row['raw'];
|
$from_text = htmlspecialchars_decode($row['raw']);
|
||||||
$to_text = $data['raw'];
|
$to_text = htmlspecialchars_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'] = $this->_format_diff(nl2br(FineDiff::renderDiffToHTMLFromOpcodes($from_text, $opcodes)));
|
$data['paste'] = htmlspecialchars_decode($this->_format_diff(nl2br(FineDiff::renderDiffToHTMLFromOpcodes($from_text, $opcodes))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user