Changeset 5876 for main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
- Timestamp:
- 18 Mar 2011, 17:52:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.py
r5848 r5876 241 241 Returns a tuple ``(<HTML_CODE>, <WARNINGS>)``, both being 242 242 strings. Where ``<HTML_CODE>`` is the HTML code generated from the 243 source string , ``<WARNINGS>`` is a string containing any warning244 messages or ``None``.243 source string (in unicode), ``<WARNINGS>`` is a string containing 244 any warning messages or ``None``. 245 245 246 246 Regular multi-line ReStructuredText strings will be returned as … … 322 322 if warning_msgs == '': 323 323 warning_msgs = None 324 return getInnerHTMLPart(fulldoc).strip(), warning_msgs 324 result = getInnerHTMLPart(fulldoc).strip() 325 if not isinstance(result, unicode): 326 result = result.decode('utf-8') 327 return result, warning_msgs 325 328 326 329 def ReST2HTML(source_string): … … 331 334 warnings. 332 335 336 The returned string will be unicode. 337 333 338 A regular document will be rendered like this: 334 339
Note: See TracChangeset for help on using the changeset viewer.