@@ -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 );
@@ -257,7 +257,8 @@ private function display_pb()
257257 meta_refresh (3 , $ redirect_url );
258258 trigger_error ($ message );
259259 }
260- break ;
260+
261+ break ;
261262
262263 case 'post ' :
263264 // process submitted data from the posting form
@@ -274,7 +275,7 @@ private function display_pb()
274275 $ data = array (
275276 'snippet_title ' => str_replace ("\n" , '' , $ this ->request ->variable ('snippet_title ' , '' , true )),
276277 'snippet_desc ' => str_replace ("\n" , '' , $ this ->request ->variable ('snippet_desc ' , '' , true )),
277- 'snippet_text ' => $ this ->request ->variable ('snippet_text ' , '' , true ),
278+ 'snippet_text ' => $ this ->request ->raw_variable ('snippet_text ' , '' ),
278279 'snippet_prunable ' => 1 ,
279280 'snippet_highlight ' => $ this ->request ->variable ('snippet_highlight ' , '' ),
280281 'snippet_prune_on ' => max (1 , min (6 , $ this ->request ->variable ('pruning_months ' , 0 ))),
@@ -419,7 +420,7 @@ private function display_pb()
419420 $ highlight = 'php ' ;
420421 }
421422
422- $ code = htmlspecialchars_decode ( $ snippet_text) ;
423+ $ code = $ snippet_text ;
423424
424425 $ geshi = new \GeSHi ($ code , $ highlight , $ this ->util ->geshi_dir );
425426 $ geshi ->set_header_type (GESHI_HEADER_NONE );
@@ -469,9 +470,9 @@ private function display_pb()
469470 }
470471
471472 // Thanks download.php
472- $ snippet_text = htmlspecialchars_decode ( utf8_decode ( $ data ['snippet_text ' ])) ;
473+ $ snippet_text = $ data ['snippet_text ' ];
473474
474- $ filename = htmlspecialchars_decode ( $ data ['snippet_title ' ]) . '. ' . $ this ->pastebin ->file_ext ();
475+ $ filename = $ data ['snippet_title ' ] . '. ' . $ this ->pastebin ->file_ext ();
475476
476477 $ user_agent = $ this ->request ->server ('HTTP_USER_AGENT ' , '' );
477478 if (strpos ($ user_agent , 'MSIE ' ) !== false || strpos ($ user_agent , 'Safari ' ) !== false || strpos ($ user_agent , 'Konqueror ' ) !== false )
0 commit comments