landoc.php seem to be deleting backslash

landoc.php seem to be deleting backslash

by Roel Cantada -
Number of replies: 4
The langdoc.php editor seem to have deleted backslash.

An example is with the help file " directorypaths.html" .
The line: "c:\program files\data\moodle", became
"c:program filesdatamoodle" when i saved the file.

I am using the langdoc.php version 1.6 from cvs.
Average of ratings: -
In reply to Roel Cantada

Re: landoc.php seem to be deleting backslash

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Yes it's a bug. Please report in the bugtracker - I'll do a quick fix in all languages and add a line to my language checklist smile

Anyone aware of other files where this bug can cause trouble?
In reply to koen roggemans

Re: landoc.php seem to be deleting backslash

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

IMHO this bug has the same reason as already reported bug 3163. There is a line in langdoc.php doing this stuff:

$content = str_replace("\\","",$content);     // Delete all slashes

This line has origin in lang.php. I'll look at it and maybe will remove all these filters - thus translators are responsible for submitted data...

In reply to David Mudrák

Re: landoc.php seem to be deleting backslash

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Yes, that bug comes close.
Deleting the line has as side-effect that al \ become \\ sad