I'm finalizing a plugin which needs PHP code to be input as a parameter to it. Obviously PHP code means that it contains all possible kinds of 'dangerous' symbols, like $,&,\n,| and so on.
Apparently the store process behaves perfectly and the code is stored, in an escaped form, with the plugin parameters in the DB. Then, when I load the data, either from inside the plugin code and from the admin interface, something breaks it and I get back just the last line, which is a very useful }.
I've tracked down the problem to
JRegistryFormatINI::stringToObject() but there I'm stuck, because I have no idea of why
ini.php lines 172 etc. are there. Why check for a '|' and then
Code:
$lines = explode('\n', $value)
if
$value is already a line of something that has already been exploded that way (line 107), and so should contain no newlines?
Moreover, at that same line
$lines seems to be used in a way which may brake the outer
foreach loop (line 132). Can anybody help me with this? Thank you