Ignore:
Timestamp:
7 Jul 2020, 20:06:03 (4 years ago)
Author:
Henrik Bettermann
Message:

Revert changes from r16145.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py

    r16145 r16148  
    111111
    112112    Main things fixed here:
    113     - just replace newlines by <br> tags
    114113    If html code:
     114    - remove newlines (not visible in HTML but visible in PDF)
    115115    - add <br> tags after <div> (as divs break lines in HTML but not in PDF)
    116116    - 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    """
    119120    if u'₦' in html:
    120121        html = html.replace(u'₦', u'NGN')
     
    123124        html = html.replace('<li>', '- ')
    124125        html = html.replace('</li>', '<br />')
     126        html = html.replace('\n', '')
     127    else:
     128        html = html.replace('\n', '<br />')
    125129    return html
    126130
Note: See TracChangeset for help on using the changeset viewer.