Changeset 16148 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 7 Jul 2020, 20:06:03 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
r16145 r16148 111 111 112 112 Main things fixed here: 113 - just replace newlines by <br> tags114 113 If html code: 114 - remove newlines (not visible in HTML but visible in PDF) 115 115 - add <br> tags after <div> (as divs break lines in HTML but not in PDF) 116 116 - replace <li> tags (as lists are not supported by reportlab) 117 """ 118 html = html.replace('\n', '<br />') 117 If not html code: 118 - just replace newlines by <br> tags 119 """ 119 120 if u'₦' in html: 120 121 html = html.replace(u'₦', u'NGN') … … 123 124 html = html.replace('<li>', '- ') 124 125 html = html.replace('</li>', '<br />') 126 html = html.replace('\n', '') 127 else: 128 html = html.replace('\n', '<br />') 125 129 return html 126 130
Note: See TracChangeset for help on using the changeset viewer.