Roundup Tracker - Issues

Issue 2551231

classification
template.py-HTMLClass::classhelp doesn't merge user defined classes
Type: behavior Severity: normal
Components: Web interface Versions: devel
process
Status: fixed fixed
:
: rouilj : rouilj
Priority: normal : Effort-Low, NeedsTesting, StarterTicket

Created on 2022-09-04 21:42 by rouilj, last changed 2025-01-19 03:22 by rouilj.

Messages
msg7642 Author: [hidden] (rouilj) Date: 2022-09-04 21:42
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.
msg8295 Author: [hidden] (rouilj) Date: 2025-01-19 03:22
Fixed this issue and the same issue in popcal.
Can't figure out what this needs for a test framework though,
so no tests.

changeset:   8291:ae7fadcac9e1
History
Date User Action Args
2025-01-19 03:22:29rouiljsetkeywords: + NeedsTesting
assignee: rouilj
status: new -> fixed
messages: + msg8295
resolution: fixed
2022-09-04 21:42:11rouiljcreate