Changeset 15be53 in indico


Ignore:
Timestamp:
06/18/12 13:29:26 (11 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
41e338
Parents:
baa19f
git-author:
Jose Benito <jose.benito.gonzalez@…> (06/18/12 13:27:47)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (06/18/12 13:29:26)
Message:

[FIX] ical html filter raises exception

This happens when there is a \r\n (of any combination of it), or a white space.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/web/http_api/ical.py

    rdd7b61 r15be53  
    7575 
    7676    if fossil['description']: 
    77         description += "Description: " + html.fromstring(fossil.get('description', "<p/>").decode('utf-8')).text_content() \ 
     77        desc_text = fossil.get('description', '').strip() 
     78        if not desc_text: 
     79            desc_text = '<p/>' 
     80        description += "Description: " + html.fromstring(desc_text.decode('utf-8')).text_content() \ 
    7881                    + '\nURL: ' + fossil['url'] 
    7982    else: 
Note: See TracChangeset for help on using the changeset viewer.