Skip to content

Commit

Permalink
[#220] Remove genshi dependency in controller user
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Dec 19, 2012
1 parent d3edb7e commit 650ff43
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions ckan/controllers/user.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging
import genshi
from urllib import quote

import ckan.misc
from pylons import session, c, g, request, config
from pylons.i18n import _

Expand Down Expand Up @@ -72,7 +70,7 @@ def _setup_template_variables(self, context, data_dict):
abort(401, _('Not authorized to see this page'))
c.user_dict = user_dict
c.is_myself = user_dict['name'] == c.user
c.about_formatted = self._format_about(user_dict['about'])
c.about_formatted = h.render_markdown(user_dict['about'])

## end hooks

Expand Down Expand Up @@ -460,16 +458,6 @@ def perform_reset(self, id):
c.user_dict = user_dict
return render('user/perform_reset.html')

def _format_about(self, about):
about_formatted = ckan.misc.MarkdownFormat().to_html(about)
try:
html = genshi.HTML(about_formatted)
except genshi.ParseError, e:
log.error('Could not print "about" field Field: %r Error: %r',
about, e)
html = _('Error: Could not parse About text')
return html

def _get_form_password(self):
password1 = request.params.getone('password1')
password2 = request.params.getone('password2')
Expand Down

0 comments on commit 650ff43

Please sign in to comment.