Properly fix htmlspecialchars.
[diogenes.git] / include / Text / Wiki / Render / Xhtml / Wikilink.php
index e5815c8..81487a0 100644 (file)
@@ -59,9 +59,9 @@ class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render {
         
         // convert *after* checking against page names so as not to mess
         // up what the user typed and what we're checking.
-        $page = htmlspecialchars($page);
-        $anchor = htmlspecialchars($anchor);
-        $text = htmlspecialchars($text);
+        $page = htmlspecialchars($page, ENT_COMPAT | ENT_HTML401, "ISO-8859-1");
+        $anchor = htmlspecialchars($anchor, ENT_COMPAT | ENT_HTML401, "ISO-8859-1");
+        $text = htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, "ISO-8859-1");
         
         // does the page exist?
         if ($exists) {
@@ -134,4 +134,4 @@ class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render {
         return $output;
     }
 }
-?>
\ No newline at end of file
+?>