Changeset dd7b61 in indico


Ignore:
Timestamp:
06/14/12 16:52:03 (11 months ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
0ceef3
Parents:
0aef7f
git-author:
Alberto Resco Perez <alberto.resco.perez@…> (06/14/12 16:05:51)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (06/14/12 16:52:03)
Message:

[FIX] Escape HTML ical export

File:
1 edited

Legend:

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

    r8cde5f rdd7b61  
    2222import datetime 
    2323import icalendar as ical 
     24from lxml import html 
    2425 
    2526# indico imports 
     
    7475 
    7576    if fossil['description']: 
    76         description += "Description: " + fossil['description'].decode('utf-8') + '\nURL: ' + fossil['url'] 
     77        description += "Description: " + html.fromstring(fossil.get('description', "<p/>").decode('utf-8')).text_content() \ 
     78                    + '\nURL: ' + fossil['url'] 
    7779    else: 
    7880        description += "URL: " + fossil['url'] 
Note: See TracChangeset for help on using the changeset viewer.