Skip to content

Commit 44321d1

Browse files
committed
issue2551323 - Remove XHTML support
First step: raise error if xhtml used in config.ini. Back end code is still present to allow an admin to re-enable xhtml as a temporary measure.
1 parent 08b48f7 commit 44321d1

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ Fixed:
145145

146146
Features:
147147

148+
- issue2551323 - Remove XHTML support. Disabled option to set
149+
html_version to xhtml. Running roundup commands with html_version
150+
set to xhtml will result in an "Invalid value for HTML_VERSION:
151+
'xhtml'" error. (John Rouillard)
148152
- issue2551103 - add pragma 'display_protected' to roundup-admin. If
149153
true, print protected attributes like id, activity, actor...
150154
when using display or specification subcommands. (John Rouillard)

doc/upgrading.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ values or if a value must be changed manually.
112112

113113
This will insert the bad API login rate limiting settings.
114114

115+
Also if you have ``html_version`` set to ``xhtml``, you will get
116+
an error.
117+
118+
Use of xhtml html_version disabled (required)
119+
---------------------------------------------
120+
121+
If you enabled xhtml formatted templates, you will need to
122+
change them to html (html4) format. Also change the value of
123+
``html_version`` from ``xhtml`` to ``html``.
124+
125+
Note that the default Roundup templates use html4 so it is
126+
unlikely that your templates are xhtml based. See
127+
`issue2551323
128+
<https://issues.roundup-tracker.org/issue2551323>`_ for
129+
details on the deprecation of xhtml.
130+
115131
Update MySQL character set/collations (required)
116132
------------------------------------------------
117133

roundup/configuration.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,19 @@ def str2value(self, value):
387387
raise OptionValueError(self, value, self.class_description)
388388

389389

390+
class HtmlVersionOption(Option):
391+
"""Accept html4 only for now. Raise error for xhtml which is not
392+
supported in roundup 2.4 and newer."""
393+
394+
class_description = "Allowed values: html4"
395+
396+
def str2value(self, value):
397+
_val = value.lower()
398+
if _val in ("html4"):
399+
return _val
400+
else:
401+
raise OptionValueError(self, value, self.class_description)
402+
390403
class EmailBodyOption(Option):
391404

392405
"""When to replace message body or strip quoting: always, never
@@ -1083,14 +1096,10 @@ def str2value(self, value):
10831096
'or "both" (these are the three allowed values).\n'
10841097
'The dispatcher is configured using the DISPATCHER_EMAIL\n'
10851098
' setting.'),
1086-
(Option, "html_version", "html4",
1099+
(HtmlVersionOption, "html_version", "html4",
10871100
"This setting should be left at the default value of html4.\n"
1088-
"Support is ending for xhtml mode.\n"
1089-
"HTML version to generate. The templates are html4 by default.\n"
1090-
"If you wish to make them xhtml, then you'll need to change\n"
1091-
"this setting to 'xhtml' too so all auto-generated HTML\n"
1092-
"is compliant.\n"
1093-
"Allowed values: html4, xhtml"),
1101+
"Support for xhtml has been disabled.\n"
1102+
"HTML version to generate. The templates are html4 by default."),
10941103
(TimezoneOption, "timezone", TimezoneOption.defaulttz,
10951104
"Default timezone offset,\n"
10961105
"applied when user's timezone is not set.",

0 commit comments

Comments
 (0)