[Xerte-dev] Re: stripslashes (and LaTeX)

Tom Reijnders reijnders at tor.nl
Thu May 23 16:13:13 BST 2013


Should this be removed from modules/xerte/engine/save.php?

print("&returnvalue=$filename");

if($_SESSION['toolkits_logon_username']=="cczpl"){

     $savepath = 
str_replace("preview.xml","patsave.xml",$_POST['filename']);

     $file_handle = fopen($xerte_toolkits_site->root_file_path . 
$savepath,'w');

     if(fwrite($file_handle, stripslashes($_POST['filedata']))!=false){

         receive_message($_SESSION['toolkits_logon_username'], "ADMIN", 
"SUCCESS", "Template " . $_POST['template_id'] . " saved" , 
stripslashes($_POST['filedata']));

     }else{

         receive_message($_SESSION['toolkits_logon_username'], "ADMIN", 
"CRITICAL", "Template " . $_POST['template_id'] . " failed to save" , 
stripslashes($_POST['filedata']));

     }

     fclose($file_handle);

}



Regards,

Tom

Op 23-5-2013 16:40, Tom Reijnders schreef:
> Thank you, and bleehhh...
>
> Perhaps we should do the stripslashes ONLY when magic_quotes are enabled.
>
> I'll play around with it.
>
> Tom
>
> Op 23-5-2013 16:19, Dave Burnett schreef:
>> http://lists.nottingham.ac.uk/pipermail/xerte/2013-January/015328.html
>>
>>
>>
>> > Date: Thu, 23 May 2013 16:05:03 +0200
>> > From: reijnders at tor.nl
>> > To: xerte-dev at lists.nottingham.ac.uk
>> > Subject: [Xerte-dev] stripslashes (and LaTeX)
>> >
>> > Does someone know why we use stripslashes in 
>> modules/xerte/engine/save.php?
>> >
>> > This causes the problems we have with LaTeX (and also when trying to
>> > escape other characters).
>> >
>> > As far as SVN is concerned this has always been in there, but I 
>> wonder why.
>> >
>> > If I remove the stripslahes, LaTeX behaves much better. (Also in 
>> MathJax)
>> >
>> > Tom
>> >
>> > --
>> > --
>> >
>> > Tom Reijnders
>> > TOR Informatica
>> > Chopinlaan 27
>> > 5242HM Rosmalen
>> > Tel: 073 5226191
>> > Fax: 073 5226196
>> >
>> >
>> > _______________________________________________
>> > Xerte-dev mailing list
>> > Xerte-dev at lists.nottingham.ac.uk
>> > http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>> > This message and any attachment are intended solely for the 
>> addressee and may contain confidential information. If you have 
>> received this message in error, please send it back to me, and 
>> immediately delete it. Please do not use, copy or disclose the 
>> information contained in this message or in any attachment. Any views 
>> or opinions expressed by the author of this email do not necessarily 
>> reflect the views of the University of Nottingham.
>> >
>> > This message has been checked for viruses but the contents of an 
>> attachment
>> > may still contain software viruses which could damage your computer 
>> system, you are advised to perform your own checks. Email 
>> communications with the University of Nottingham may be monitored as 
>> permitted by UK legislation.
>> >
>> >
>> >
>> >
>>
>> This message and any attachment are intended solely for the addressee 
>> and may contain confidential information. If you have received this 
>> message in error, please send it back to me, and immediately delete 
>> it.   Please do not use, copy or disclose the information contained 
>> in this message or in any attachment.  Any views or opinions 
>> expressed by the author of this email do not necessarily reflect the 
>> views of the University of Nottingham.
>>
>> This message has been checked for viruses but the contents of an 
>> attachment may still contain software viruses which could damage your 
>> computer system, you are advised to perform your own checks. Email 
>> communications with the University of Nottingham may be monitored as 
>> permitted by UK legislation.
>>
>>
>>
>>
>> _______________________________________________
>> Xerte-dev mailing list
>> Xerte-dev at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> -- 
> --
>
> Tom Reijnders
> TOR Informatica
> Chopinlaan 27
> 5242HM Rosmalen
> Tel: 073 5226191
> Fax: 073 5226196
>
>
> This message and any attachment are intended solely for the addressee 
> and may contain confidential information. If you have received this 
> message in error, please send it back to me, and immediately delete 
> it.   Please do not use, copy or disclose the information contained in 
> this message or in any attachment.  Any views or opinions expressed by 
> the author of this email do not necessarily reflect the views of the 
> University of Nottingham.
>
> This message has been checked for viruses but the contents of an 
> attachment may still contain software viruses which could damage your 
> computer system, you are advised to perform your own checks. Email 
> communications with the University of Nottingham may be monitored as 
> permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

-- 
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20130523/b041682a/attachment-0001.html>


More information about the Xerte-dev mailing list