root/qPloneGoogleMaps/tags/0.2.0/utility.py

Revision 534 (checked in by piv, 2 years ago)

added tests, used adapter and browser in maps_topic_view, DEPENDENCY.txt, version.txt, HISTORY.txt and README.txt,

  • Property svn:eol-style set to native
Line 
1
2 """ Utility module """
3
4 def processDesc(desc):
5     """ Utility function for processing objects descriptions  """
6     import re
7     pattern1 = re.compile(r'[\r\n]', re.M|re.I)
8     pattern2 = re.compile(r'[\"]', re.M|re.I)
9     res = pattern2.sub("'", desc)
10     return pattern1.sub(' ', res)
Note: See TracBrowser for help on using the browser.