Skip to content

Commit 97bb369

Browse files
cci: fix mw-tag classes for revs
1 parent 07a010c commit 97bb369

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ui/root/DeputyContributionSurveyRevision.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ export default class DeputyContributionSurveyRevision
234234

235235
// Be wary of the spaces between tags.
236236
return <div
237-
class={ ( this.revision.tags ?? [] ).map( ( v ) => 'mw-tag-' + v ).join( ' ' ) }
237+
class={ ( this.revision.tags ?? [] ).map(
238+
( v ) => 'mw-tag-' + v
239+
.replace( /[^A-Z0-9-]/gi, '' )
240+
.replace( /\s/g, '_' )
241+
).join( ' ' ) }
238242
>
239243
{unwrapWidget( this.completedCheckbox )}
240244
<ChangesListLinks

0 commit comments

Comments
 (0)