From 0ff945ddf19010b890458face057505f7b48b572 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 Sep 2010 15:37:45 -0400 Subject: [PATCH] external: Disable RPC::XML's "smart" encoding, which sent ints for strings that contained only a number, fixing a longstanding crash of the rst plugin. --- IkiWiki/Plugin/external.pm | 2 ++ debian/changelog | 3 +++ doc/bugs/rst_fails_on_file_containing_only_a_number.mdwn | 3 +++ 3 files changed, 8 insertions(+) diff --git a/IkiWiki/Plugin/external.pm b/IkiWiki/Plugin/external.pm index ec91c79db..a4cc1dd3c 100644 --- a/IkiWiki/Plugin/external.pm +++ b/IkiWiki/Plugin/external.pm @@ -28,7 +28,9 @@ sub import { $plugins{$plugin}={in => $plugin_read, out => $plugin_write, pid => $pid, accum => ""}; + $RPC::XML::ENCODING="utf-8"; + $RPC::XML::FORCE_STRING_ENCODING="true"; rpc_call($plugins{$plugin}, "import"); } diff --git a/debian/changelog b/debian/changelog index 0eb5810d0..46401b58c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,9 @@ ikiwiki (3.20100832) UNRELEASED; urgency=low * blueview: Fix display of links to translated pages in the page header. * Set isPermaLink="no" for guids in rss feeds. * blogspam: Fix crash when content contained utf-8. + * external: Disable RPC::XML's "smart" encoding, which sent ints + for strings that contained only a number, fixing a longstanding crash + of the rst plugin. -- Joey Hess Tue, 07 Sep 2010 12:08:05 -0400 diff --git a/doc/bugs/rst_fails_on_file_containing_only_a_number.mdwn b/doc/bugs/rst_fails_on_file_containing_only_a_number.mdwn index dab3b7e5b..99e46aac9 100644 --- a/doc/bugs/rst_fails_on_file_containing_only_a_number.mdwn +++ b/doc/bugs/rst_fails_on_file_containing_only_a_number.mdwn @@ -24,3 +24,6 @@ throwing code..): > No, still the same failure. I think it's failing parsing the input data, > (which perl probably transmitted as an int due to perl internals) > not writing out its response. --[[Joey]] + +> On second thought, this was a bug in ikiwiki, it should be transmitting +> that as a string. Fixed in external.pm --[[Joey]] -- 2.32.0.93.g670b81a890