# HG changeset patch # User Marcin Kuzminski # Date 2019-11-03 15:08:53 # Node ID 8ddabfbf9fcd295c64688874a4e96ebf704ef098 # Parent 386f1ab6dd796f70d898e7a6562cc75c6d54608f js: tooltip allow full html mode using a base64 encoded data property. diff --git a/rhodecode/public/js/src/rhodecode.js b/rhodecode/public/js/src/rhodecode.js --- a/rhodecode/public/js/src/rhodecode.js +++ b/rhodecode/public/js/src/rhodecode.js @@ -295,7 +295,12 @@ var tooltipActivate = function () { instance.content(data); }) } else { - var data = '
{0}
'.format($origin.data('hovercardAlt')) + if ($origin.data('hovercardAltHtml')) { + var data = atob($origin.data('hovercardAltHtml')); + } else { + var data = '
{0}
'.format($origin.data('hovercardAlt')) + } + instance.content(data); } diff --git a/rhodecode/templates/base/base.mako b/rhodecode/templates/base/base.mako --- a/rhodecode/templates/base/base.mako +++ b/rhodecode/templates/base/base.mako @@ -1,4 +1,13 @@ ## -*- coding: utf-8 -*- + +## base64 filter +<%! + def base64(text): + import base64 + from rhodecode.lib.helpers import safe_str + return base64.encodestring(safe_str(text)) +%> + <%inherit file="root.mako"/> <%include file="/ejs_templates/templates.html"/>