]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Ensure that web edited pages always end in a newline.
authorJoey Hess <joey@kitenet.net>
Wed, 12 Dec 2007 18:41:21 +0000 (13:41 -0500)
committerJoey Hess <joey@kitenet.net>
Wed, 12 Dec 2007 18:41:21 +0000 (13:41 -0500)
IkiWiki/CGI.pm
debian/changelog

index 567fa85beaf2f185eaab65fbc81aac04985e7351..33e670eacbd7291b6cd1a30092b33f9b80e6bd93 100644 (file)
@@ -552,6 +552,7 @@ sub cgi_editpage ($$) { #{{{
                });
                $content=~s/\r\n/\n/g;
                $content=~s/\r/\n/g;
+               $content.="\n" if $content !~ /\n$/;
 
                $config{cgi}=0; # avoid cgi error message
                eval { writefile($file, $config{srcdir}, $content) };
index e4d4083a9defb63cbb5f3cee5396407599633b40..5f05f7a0f424297c860d56594c43699850ad574f 100644 (file)
@@ -24,6 +24,7 @@ ikiwiki (2.16) UNRELEASED; urgency=low
     so that more than one plugin can use this hook.
     I believe this is a safe change, since only passwordauth uses this hook.
     (If some other plugin already used it, it would have broken passwordauth!)
+  * Ensure that web edited pages always end in a newline.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 03 Dec 2007 14:47:36 -0500