@@ -241,7 +241,7 @@ private function display_pb()
241241 {
242242 $ data = [
243243 'snippet_id ' => $ snippet_id ,
244- 'snippet_text ' => $ this ->request ->variable ('edit_snippet ' , '' , true ),
244+ 'snippet_text ' => $ this ->request ->raw_variable ('edit_snippet ' , '' ),
245245 ];
246246
247247 $ snippet ->load_from_array ($ data );
@@ -258,7 +258,6 @@ private function display_pb()
258258 trigger_error ($ message );
259259 }
260260
261-
262261 break ;
263262
264263 case 'post ' :
@@ -276,7 +275,7 @@ private function display_pb()
276275 $ data = array (
277276 'snippet_title ' => str_replace ("\n" , '' , $ this ->request ->variable ('snippet_title ' , '' , true )),
278277 'snippet_desc ' => str_replace ("\n" , '' , $ this ->request ->variable ('snippet_desc ' , '' , true )),
279- 'snippet_text ' => $ this ->request ->variable ('snippet_text ' , '' , true ),
278+ 'snippet_text ' => $ this ->request ->raw_variable ('snippet_text ' , '' ),
280279 'snippet_prunable ' => 1 ,
281280 'snippet_highlight ' => $ this ->request ->variable ('snippet_highlight ' , '' ),
282281 'snippet_prune_on ' => max (1 , min (6 , $ this ->request ->variable ('pruning_months ' , 0 ))),
@@ -421,7 +420,7 @@ private function display_pb()
421420 $ highlight = 'php ' ;
422421 }
423422
424- $ code = htmlspecialchars_decode ( $ snippet_text) ;
423+ $ code = $ snippet_text ;
425424
426425 $ geshi = new \GeSHi ($ code , $ highlight , $ this ->util ->geshi_dir );
427426 $ geshi ->set_header_type (GESHI_HEADER_NONE );
@@ -471,9 +470,9 @@ private function display_pb()
471470 }
472471
473472 // Thanks download.php
474- $ snippet_text = htmlspecialchars_decode ( utf8_decode ( $ data ['snippet_text ' ])) ;
473+ $ snippet_text = $ data ['snippet_text ' ];
475474
476- $ filename = htmlspecialchars_decode ( $ data ['snippet_title ' ]) . '. ' . $ this ->pastebin ->file_ext ();
475+ $ filename = $ data ['snippet_title ' ] . '. ' . $ this ->pastebin ->file_ext ();
477476
478477 $ user_agent = $ this ->request ->server ('HTTP_USER_AGENT ' , '' );
479478 if (strpos ($ user_agent , 'MSIE ' ) !== false || strpos ($ user_agent , 'Safari ' ) !== false || strpos ($ user_agent , 'Konqueror ' ) !== false )
0 commit comments