@@ -387,6 +387,19 @@ def str2value(self, value):
387
387
raise OptionValueError (self , value , self .class_description )
388
388
389
389
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
+
390
403
class EmailBodyOption (Option ):
391
404
392
405
"""When to replace message body or strip quoting: always, never
@@ -1083,14 +1096,10 @@ def str2value(self, value):
1083
1096
'or "both" (these are the three allowed values).\n '
1084
1097
'The dispatcher is configured using the DISPATCHER_EMAIL\n '
1085
1098
' setting.' ),
1086
- (Option , "html_version" , "html4" ,
1099
+ (HtmlVersionOption , "html_version" , "html4" ,
1087
1100
"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." ),
1094
1103
(TimezoneOption , "timezone" , TimezoneOption .defaulttz ,
1095
1104
"Default timezone offset,\n "
1096
1105
"applied when user's timezone is not set." ,
0 commit comments