[issue2551231] template.py-HTMLClass::classhelp doesn't merge user defined classes
John Rouillard <[email protected]> Sun, 04 Sep 2022 21:42:11 +0000
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
New submission from John Rouillard:
if classhelp is called with html_args={"class": "some_class"}, the output
has two class attributes which is invalid html.
The returned string is generated by:
return '<a class="classhelp" data-helpurl="%s" data-width="%s" data-height="%s"
href="%s" onclick="%s" %s>%s</a>' %
(help_url, width, height,
help_url, onclick, self.cgi_escape_attrs(**html_kwargs),
self._(label))
which hard codes a class="classhelp". Better way to handle this is to
check html_kwargs for 'class' key and append the value (with a space)
to a new class_value variable (initialized to "classhelp"), then remove
the class element from html_kwargs.
Replace the hard coded class value for the new class_value variable.
----------
components: Web interface
keywords: Effort-Low, StarterTicket
messages: 7642
nosy: rouilj
priority: normal
severity: normal
status: new
title: template.py-HTMLClass::classhelp doesn't merge user defined classes
type: behavior
versions: devel
_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551231>
_________________________________________________