Edgewall Software
Modify

Opened 5 weeks ago

Closed 5 weeks ago

#13905 closed defect (fixed)

div processor with `style` (no value) raises a TypeError

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.6.1
Component: wiki system Version: 1.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fixed an issue that an error is rendered when div processor with attributes have no value.

API Changes:
Internal Changes:

Description

{{{#!div style
text
}}}

As the result, the following is displayed:

Error: Processor div failed
sequence item 0: expected str instance, bool found

Traceback

04:26:04 AM Trac[formatter] ERROR: Processor div failed for <Resource 'ticket'>:
Traceback (most recent call last):
  File "/src/tracdev/git/trac/wiki/formatter.py", line 1220, in _exec_processor
    return processor.process(text)
  File "/src/tracdev/git/trac/wiki/formatter.py", line 380, in process
    text = self.processor(text)
  File "/src/tracdev/git/trac/wiki/formatter.py", line 262, in _div_processor
    return self._elt_processor('div', format_to_html, text)
  File "/src/tracdev/git/trac/wiki/formatter.py", line 249, in _elt_processor
    elt = getattr(tag, eltname)(**(self.args or {}))
  File "/src/tracdev/git/trac/util/html.py", line 411, in __call__
    d = self._dict_from_kwargs(kwargs)
  File "/src/tracdev/git/trac/util/html.py", line 404, in _dict_from_kwargs
    v = self._attr_value(k, v)
  File "/src/tracdev/git/trac/util/html.py", line 457, in _attr_value
    return html_attribute(k, v)
  File "/src/tracdev/git/trac/util/html.py", line 252, in html_attribute
    val = styles(val) or None
  File "/src/tracdev/git/trac/util/html.py", line 329, in styles
    return '; '.join(styles)
TypeError: sequence item 0: expected str instance, bool found

Attachments (0)

Change History (1)

comment:1 by Jun Omae, 5 weeks ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fixed in [17953] and merged in [17954].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.