X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2FText%2FWiki%2FRender%2FXhtml%2FFunction.php;fp=include%2FText%2FWiki%2FRender%2FXhtml%2FFunction.php;h=c4ac858f6fab607125be68756486a469f853d25e;hb=60181dfb652fcd5856ed544bde3634fd67eb58dc;hp=fff37c1c38286d6fa85b00148a85edb81199f0f2;hpb=ce9996b59ad103aca41d9ad6f3ee8edb45999557;p=diogenes.git diff --git a/include/Text/Wiki/Render/Xhtml/Function.php b/include/Text/Wiki/Render/Xhtml/Function.php index fff37c1..c4ac858 100644 --- a/include/Text/Wiki/Render/Xhtml/Function.php +++ b/include/Text/Wiki/Render/Xhtml/Function.php @@ -40,9 +40,9 @@ class Text_Wiki_Render_Xhtml_Function extends Text_Wiki_Render { // build the baseline output $output = $this->conf['format_main']; - $output = str_replace('%access', htmlspecialchars($access), $output); - $output = str_replace('%return', htmlspecialchars($return), $output); - $output = str_replace('%name', htmlspecialchars($name), $output); + $output = str_replace('%access', htmlspecialchars($access, ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $output); + $output = str_replace('%return', htmlspecialchars($return, ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $output); + $output = str_replace('%name', htmlspecialchars($name, ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $output); // build the set of params $list = array(); @@ -56,9 +56,9 @@ class Text_Wiki_Render_Xhtml_Function extends Text_Wiki_Render { } // add the param elements - $tmp = str_replace('%type', htmlspecialchars($val['type']), $tmp); - $tmp = str_replace('%descr', htmlspecialchars($val['descr']), $tmp); - $tmp = str_replace('%default', htmlspecialchars($val['default']), $tmp); + $tmp = str_replace('%type', htmlspecialchars($val['type'], ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $tmp); + $tmp = str_replace('%descr', htmlspecialchars($val['descr'], ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $tmp); + $tmp = str_replace('%default', htmlspecialchars($val['default'], ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $tmp); $list[] = $tmp; } @@ -70,8 +70,8 @@ class Text_Wiki_Render_Xhtml_Function extends Text_Wiki_Render { $list = array(); foreach ($throws as $key => $val) { $tmp = $this->conf['format_throws']; - $tmp = str_replace('%type', htmlspecialchars($val['type']), $tmp); - $tmp = str_replace('%descr', htmlspecialchars($val['descr']), $tmp); + $tmp = str_replace('%type', htmlspecialchars($val['type'], ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $tmp); + $tmp = str_replace('%descr', htmlspecialchars($val['descr'], ENT_COMPAT | ENT_HTML401, "ISO-8859-1"), $tmp); $list[] = $tmp; } @@ -84,4 +84,4 @@ class Text_Wiki_Render_Xhtml_Function extends Text_Wiki_Render { return "\n$output\n\n"; } } -?> \ No newline at end of file +?>