Hi guys,
I have a sinister problem in one Moodle 1.9.9+ server.
On the startup page (logged in or not), I have the Summary, and if I make a link with the HTML Editor, it makes correctly, but when I submit, the link becomes with some backslashes. See my examples above:
1) On the HTML Editor, I write a text: http://www.example.com
2) Choose the link button
3) In the field "URL" I repeated the URL: http://www.example.com
4) Click on OK button.
5) Click on Save Changes button.
And in the summary, the link is shown as: <a href="\"http://www.example.com\"">http://www.example.com</a>
and when I click him the browser goes to http://mymoodledomain.com/\"http://www.example.com\"
If I reedit the same Summary and simply press Save Changes, the link becomes with more backslashes:
http://mymoodledomain.com/\"\\\"http://www.example.com\\\"\"
And again:
http://mymoodledomain.com/\"\\\"\\\\\\\"http://www.example.com\\\\\\\"\\\"\"
I don't know what are happening with my Moodle, or my PHP.
I've tried to disable the magic_quotes_gpc, and them defined the constant MOODLE_SANE_INPUT with some value, but works parcially, because the same problem occurs too with Front Page Settings, and disabling the magic_quotes and enabling the constant, for this case not works. If I've a title with quotes, on each submit more backslashes are saved, for example:
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"example\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
Please guys, I need to solve this problem more quickly is possible.
Any sugestions?
Tks for all.
I've encountered the problem and solved it. Was on PostgreSQL.
The 9.1 version becomes with 2 options enabled by default, and the 8.3 was off. These options are called "standard_conforming_strings" and "escape_string_warning" and are encountered on postgresql.conf.
When enabled, these options saves an escape for an escape char, that comes of PHP by the "magic_quotes_gpc" resource when submitting a form.
Tks for all!