src/cm/utils/html.py
changeset 175 4f072edc51a1
parent 154 8cb89c153140
--- a/src/cm/utils/html.py	Sat Feb 13 11:54:11 2010 +0100
+++ b/src/cm/utils/html.py	Sat Feb 13 12:02:23 2010 +0100
@@ -2,6 +2,7 @@
 Package to manipulage html chunks
 """
 
+from string_utils import strip_cr
 from BeautifulSoup import BeautifulSoup, Comment
 
 def surrond_text_node(html_chunk, start_html, end_html):
@@ -16,6 +17,13 @@
     return unicode(soup)
     
 
-# utilities    
+#utilities    
 def get_text_nodes(soup):
     return soup(text=lambda text:not isinstance(text, Comment))
+
+#WARNING behavior changed also for mardown. but really shouldn't hurt 20100212
+#it is text as received from textarea
+def on_content_receive(txt, format) :
+    #because textarea content arent packaged the same way on windows IE and linux FF, dhouldn't't hurt to clean it for any format
+    return strip_cr(txt)
+