# similar code as in <htmlet> tag...
function efPvedocsPostProcessFunction($parser, &$text) {
$text = preg_replace_callback(
- '/<--- @PVEDOCSHACK@ ([0-9a-zA-Z\\+\\/]+=*) @PVEDOCSHACK@ -->/sm',
+ '/-_- @PVEDOCS_BASE64@ ([0-9a-zA-Z\\+\\/]+=*) @PVEDOCS_BASE64@ -_-/sm',
function ($m) { return base64_decode("$m[1]"); },
$text);
$content = file_get_contents("/usr/share/pve-docs/$param1");
- $output = '<--- @PVEDOCSHACK@ '.base64_encode($content).' @PVEDOCSHACK@ -->';
+ # do not use '<' or '>', it seems newer mediawiki converts it to '<' and '>'
+ # and then the regex for the decode in efPvedocsPostProcessFunction does not matches..
+ $output = '-_- @PVEDOCS_BASE64@ '.base64_encode($content).' @PVEDOCS_BASE64@ -_-';
return array($output, 'noparse' => true, 'isHTML' => true);
}