changeset 972:213776426ce2

Added get_raw_body_str to the Page class
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Fri, 14 Jul 2006 16:58:43 +0200
parents d24f2b1d606a
children 49a9baa51a1f
files MoinMoin/Page.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Wed Jul 12 00:14:55 2006 +0200
+++ b/MoinMoin/Page.py	Fri Jul 14 16:58:43 2006 +0200
@@ -780,7 +780,7 @@
     def get_raw_body(self):
         """ Load the raw markup from the page file.
 
-        @rtype: str
+        @rtype: unicode
         @return: raw page contents of this page
         """
         if self._raw_body is None:
@@ -806,7 +806,15 @@
                 file.close()
 
         return self._raw_body
+    
+    def get_raw_body_str(self):
+        """ Returns the raw markup from the page file, as a string.
 
+        @rtype: str
+        @return: raw page contents of this page
+        """
+        return self.get_raw_body().encode("utf-8")
+    
     def set_raw_body(self, body, modified=0):
         """ Set the raw body text (prevents loading from disk).