Use BeautifulSoup to clear out CCP's fail

This commit is contained in:
2011-09-05 20:06:29 +01:00
parent ae6f991867
commit 4893e9597c
2 changed files with 4 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.conf import settings from django.conf import settings
from BeautifulSoup import BeautifulSoup
from piston.handler import BaseHandler from piston.handler import BaseHandler
from piston.utils import rc, throttle from piston.utils import rc, throttle
from gargoyle import gargoyle from gargoyle import gargoyle
@@ -185,7 +186,7 @@ class OpTimerHandler(BaseHandler):
'eventTitle': node.getAttribute('eventTitle'), 'eventTitle': node.getAttribute('eventTitle'),
'duration': duration, 'duration': duration,
'isImportant': int(node.getAttribute('importance')), 'isImportant': int(node.getAttribute('importance')),
'eventText': node.getAttribute('eventText'), 'eventText': ''.join(BeautifulSoup(node.getAttribute('eventText')).findAll(text=True)),
'endsIn':endsIn, 'endsIn':endsIn,
'forumLink': forumlink} 'forumLink': forumlink}
events.append(event) events.append(event)

View File

@@ -14,4 +14,5 @@ django-celery==2.2.4
xmpppy xmpppy
django-sentry django-sentry
nexus nexus
-e git+https://nikdoof@github.com/nikdoof/gargoyle.git@dca57fc4b437b85f8cbc#egg=gargoyle -e git+https://github.com/nikdoof/gargoyle.git@dca57fc4b437b85f8cbc#egg=gargoyle
beautifulsoup