Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8
-
Fix Version/s: None
-
Component/s: Wiki (1.x)
-
Labels:None
-
Environment:All platform
-
Affected Branches:MOODLE_18_STABLE
Description
I've been in the face of two strange phenomenons under using ewiki on Moodle1.8. Under checking "Disable CamelCase Linking" on ewiki (Moodle1.8, 1.7, ...), Camel case words (eg. UsingMoodle, WikiModule...) does not match as Camel case. On the other hand, unexpected words (eg. a+, a][, ...) will match as Camel case.
The cause of these problems is on following code, in mod/wiki/ewiki/ewiki.php
if ($moodle_disable_camel_case) { define("EWIKI_CHARS_L", ""); define("EWIKI_CHARS_U", ""); } else { define("EWIKI_CHARS_L", "a-z_??$\337-\377"); define("EWIKI_CHARS_U", "A-Z0-9\300-\336"); }
Please change this block as follows,
if ($moodle_disable_camel_case) { define("EWIKI_CHARS_L", "\t"); define("EWIKI_CHARS_U", "\r"); } else { define("EWIKI_CHARS_L", "a-z_??$\337-\377"); define("EWIKI_CHARS_U", "A-Z0-9\300-\336"); }
EWIKI_CHARS_L is Tab code, EWIKI_CHARS_U is Carriage return code.
Tab & CR are not so important. But it's dangerous that EWIKI_CHARS_L and EWIKI_CHARS_U are blank.
Please see also http://moodle.org/mod/forum/discuss.php?d=85554 .
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Following block is not need. This block affects Wiki contents. Very dangerous.
Please comment out.
mod/wiki/ewiki/ewiki.php?function ewiki_format()?Line 1952,
foreach ($wm_style as $find=>$replace)
Example) '==' disapears.
-
-
- text style triggers
foreach ($wm_style as $find=>$replace)
Unknown macro: { $find_len = strlen($find); $loop = 20; while(($loop--) && (($l = strpos($line, $find)) !== false) && ($r = strpos($line, $find, $l + $find_len))) {
$line = substr($line, 0, $l) . $replace[0] .
substr($line, $l + strlen($find), $r - $l - $find_len) .
$replace[1] . substr($line, $r + $find_len);
} }
Example) '==' disapears.