ui: fixed default gravatar b64 code
This commit is contained in:
parent
10c3fba396
commit
d635d5ea1f
1 changed files with 4 additions and 4 deletions
|
|
@ -81,7 +81,7 @@ from rhodecode.lib.html_filters import sanitize_html
|
|||
from rhodecode.lib.pagination import Page, RepoPage, SqlPage
|
||||
from rhodecode.lib import ext_json
|
||||
from rhodecode.lib.ext_json import json
|
||||
from rhodecode.lib.str_utils import safe_bytes, convert_special_chars
|
||||
from rhodecode.lib.str_utils import safe_bytes, convert_special_chars, base64_to_str
|
||||
from rhodecode.lib.utils import repo_name_slug, get_custom_lexer
|
||||
from rhodecode.lib.str_utils import safe_str
|
||||
from rhodecode.lib.utils2 import (
|
||||
|
|
@ -1304,7 +1304,7 @@ class InitialsGravatar(object):
|
|||
viewBox="-15 -10 439.165 429.164"
|
||||
|
||||
xml:space="preserve"
|
||||
font-family="{font_family}
|
||||
font-family="{font_family}"
|
||||
style="background:{background};" >
|
||||
|
||||
<path d="M204.583,216.671c50.664,0,91.74-48.075,
|
||||
|
|
@ -1374,8 +1374,8 @@ class InitialsGravatar(object):
|
|||
return img_data
|
||||
|
||||
def generate_svg(self, svg_type=None):
|
||||
img_data = safe_bytes(self.get_img_data(svg_type))
|
||||
return "data:image/svg+xml;base64,%s" % safe_str(base64.b64encode(img_data))
|
||||
img_data = base64_to_str(self.get_img_data(svg_type))
|
||||
return "data:image/svg+xml;base64,{}".format(img_data)
|
||||
|
||||
|
||||
def initials_gravatar(request, email_address, first_name, last_name, size=30, store_on_disk=False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue