mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
htmlspecialchars() -.-
This commit is contained in:
parent
2513a0dc2d
commit
51f58c5710
@ -22,7 +22,7 @@ $config['geshi_languages'] = array(
|
||||
'latex' => 'LaTeX',
|
||||
'sql' => 'SQL',
|
||||
'xml' => 'XML',
|
||||
'text' => 'Plaintext',
|
||||
'text' => 'Plain Text',
|
||||
'abap' => 'ABAP',
|
||||
'actionscript' => 'Actionscript',
|
||||
'ada' => 'ADA',
|
||||
|
@ -46,7 +46,7 @@ class Main extends CI_Controller
|
||||
$data['private_set'] = $this->db_session->userdata('private');
|
||||
$data['snipurl_set'] = $this->db_session->userdata('snipurl');
|
||||
$data['remember_set'] = $this->db_session->userdata('remember');
|
||||
$data['paste_set'] = htmlspecialchars($paste);
|
||||
$data['paste_set'] = $paste;
|
||||
$data['title_set'] = $title;
|
||||
$data['reply'] = $reply;
|
||||
|
||||
|
@ -33,7 +33,9 @@ class Pastes extends CI_Model
|
||||
$this->load->library('process');
|
||||
$data['id'] = NULL;
|
||||
$data['created'] = time();
|
||||
$data['raw'] = $this->input->post('code');
|
||||
|
||||
//this is SO evil… saving the «raw» data with htmlspecialchars :-( (but I have to leave this, because of backwards-compatibility)
|
||||
$data['raw'] = htmlspecialchars($this->input->post('code'));
|
||||
$data['lang'] = htmlspecialchars($this->input->post('lang'));
|
||||
$data['replyto'] = $this->input->post('reply');
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
header('Content-type: text/plain');
|
||||
header('Content-disposition: attachment');
|
||||
//todo: nice filename header('Content-disposition: attachment;filename=' . $title . '.' . $lang_code);
|
||||
echo $raw;
|
||||
echo htmlspecialchars_decode($raw);
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
header('Content-Type:text/plain; charset=utf-8');
|
||||
echo $raw;
|
||||
echo htmlspecialchars_decode($raw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user