- Timestamp:
- 6 Jul 2020, 07:48:42 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
r16061 r16145 111 111 112 112 Main things fixed here: 113 - just replace newlines by <br> tags 113 114 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 If not html code: 118 - just replace newlines by <br> tags 119 """ 117 """ 118 html = html.replace('\n', '<br />') 120 119 if u'₦' in html: 121 120 html = html.replace(u'₦', u'NGN') … … 124 123 html = html.replace('<li>', '- ') 125 124 html = html.replace('</li>', '<br />') 126 html = html.replace('\n', '')127 else:128 html = html.replace('\n', '<br />')129 125 return html 130 126
Note: See TracChangeset for help on using the changeset viewer.