]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* YA utf-8 patch from Recai, this time to fix previewing a page so that
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 15 Jun 2006 03:44:27 +0000 (03:44 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 15 Jun 2006 03:44:27 +0000 (03:44 +0000)
  the text in the input box is re-encoded back to utf-8.

IkiWiki/CGI.pm
debian/changelog

index 986a8ee1d6b78a0c107d7732d787282ef1b40a7c..4f4c488762ee477245cb3ad79dc39ae449fdac59 100644 (file)
@@ -353,9 +353,12 @@ sub cgi_editpage ($$) { #{{{
        }
        elsif ($form->submitted eq "Preview") {
                require IkiWiki::Render;
+               require Encode;
+               my $content = Encode::decode_utf8($form->field('editcontent'));
+               $form->field(name => "editcontent", value => $content, force => 1);
                $form->tmpl_param("page_preview",
-                       htmlize($config{default_pageext},
-                               linkify($page, $page, $form->field('editcontent'))));
+                       Encode::decode_utf8(htmlize($config{default_pageext},
+                               linkify($page, $page, $content))));
        }
        else {
                $form->tmpl_param("page_preview", "");
index 99a72908458a88991b1e100231c302fdf3fb817a..28d423ba6c47a13578d2e3ef1375dfa55d8aef1c 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (1.6) UNRELEASED; urgency=low
+
+  * YA utf-8 patch from Recai, this time to fix previewing a page so that
+    the text in the input box is re-encoded back to utf-8.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 14 Jun 2006 23:38:40 -0400
+
 ikiwiki (1.5) unstable; urgency=low
 
   * Add --timeformat config option to allow changing how dates are displayed.