Modify ↓
Opened 5 years ago
Last modified 14 months ago
#13197 new defect
Redundant escaping exception messages from INavigationContributor components
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | rendering | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Exception messages from INavigationContributor
components are redundantly escaped when showing as a warning.
-
trac/web/chrome.py
diff --git a/trac/web/chrome.py b/trac/web/chrome.py index 1bbb5f665..619d325d6 100644
a b from trac.util.datefmt import ( 65 65 get_day_names_jquery_ui, get_timezone_list_jquery_ui, 66 66 get_first_week_day_jquery_ui, get_timepicker_separator_jquery_ui, 67 67 get_period_names_jquery_ui, localtz) 68 from trac.util.translation import _, get_available_locales 68 from trac.util.translation import _, get_available_locales, tag_ 69 69 from trac.web.api import IRequestHandler, ITemplateStreamFilter, HTTPNotFound 70 70 from trac.web.href import Href 71 71 from trac.wiki import IWikiSyntaxProvider … … def component_guard(env, req, component): 411 411 try: 412 412 yield 413 413 except Exception as e: 414 add_warning(req, _("%(component)s failed with %(exc)s", 415 component=component.__class__.__name__, 416 exc=exception_to_unicode(e))) 414 add_warning(req, tag_("%(component)s failed with %(exc)s", 415 component=component.__class__.__name__, 416 exc=tag(e.__class__.__name__, ': ', 417 to_fragment(e)))) 417 418 raise 418 419 419 420
Attachments (2)
Change History (5)
by , 5 years ago
Attachment: | configuration-error-1.4-stable.png added |
---|
by , 5 years ago
Attachment: | after-the-patch.png added |
---|
comment:2 by , 5 years ago
Component: | general → rendering |
---|---|
Milestone: | → next-stable-1.4.x |
Note:
See TracTickets
for help on using tickets.
After the patch: