Changeset 17816 for main/waeup.kofa


Ignore:
Timestamp:
14 Jun 2024, 10:11:23 (3 months ago)
Author:
Henrik Bettermann
Message:

Allow to use bold letters in non-html-coded texts.

File:
1 edited

Legend:

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

    r17555 r17816  
    118118
    119119    The link tag must not be used in html coded text. Use a tags instead.
     120    Bold tags can be used also in non-html coded text. Then the <fettt> tag
     121    must be used instead.
    120122
    121123    If not html code:
     
    124126    if u'₦' in html:
    125127        html = html.replace(u'₦', u'NGN')
    126     if '</' in html and not '</link' in html:
     128    # detect html code
     129    if '</' in html and not '</link' in html and not '</fettt' in html:
    127130        html = html.replace('</div>', '</div><br />')
    128131        html = html.replace('<li>', '- ')
     
    131134    else:
    132135        html = html.replace('\n', '<br />')
     136        html = html.replace('fettt', 'strong')
    133137    return html
    134138
Note: See TracChangeset for help on using the changeset viewer.