Skip to content

Commit 8068270

Browse files
committed
bug: make classhelper link open in new window when js is disabled
Prevent the web page displaying a classhelper link from being replaced if JavaScript is disabled.
1 parent 200addf commit 8068270

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ Fixed:
148148
- issue2551350 - Python changes for 3.12 with roundup 2.3.0. Fixes for
149149
mailer.py crash due to change in starttls signature change. (Patch
150150
by Andrew (kragacles), modified and applied John Rouillard)
151+
- make classhelper link open in a new window by setting
152+
target="_blank". This prevents overwriting of current page with the
153+
classhelper if javascript is disabled. (John Rouillard)
151154

152155
Features:
153156

roundup/cgi/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
981981
(help_url, width, height)
982982
return ('<a class="classhelp" data-helpurl="%s" '
983983
'data-width="%s" data-height="%s" href="%s" '
984-
'onclick="%s" %s>%s</a>') % (
984+
'target="_blank" onclick="%s" %s>%s</a>') % (
985985
help_url, width, height,
986986
help_url, onclick, self.cgi_escape_attrs(**html_kwargs),
987987
self._(label))

0 commit comments

Comments
 (0)