<p>There are an endless amount of shenanigans that you can get up to using CSS classes. Examples are available privately on request.</p>
<p>This PR makes a few related changes:</p>
<ul>
<li>Adds tests for adding classes to table elements</li>
<li>Refactors the configuration setup for the sanitize gem (although it turned out not to be necessary for this particular task)</li>
<li>Strip away all class attributes from the output, by extending our custom transformer, to prevent shenanigans.</li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/3149'>https://github.com/openstreetmap/openstreetmap-website/pull/3149</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Add tests for richtext table classes</li>
  <li>Rework configuration to use Sanitize::Config.merge</li>
  <li>Strip away class attributes from sanitized outputs</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3149/files#diff-ee15065a4f16df7821572906bef72debce8cdfc1397cdf0fa37fb698ce5fc74b">config/initializers/sanitize.rb</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3149/files#diff-c1cefbd36a92f5d74850361751b9b01c7d326221cfa8c15c0c071008165de745">test/lib/rich_text_test.rb</a>
    (23)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3149.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3149.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3149.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3149.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3149">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI76CKV3HOLKDVP5JLTFI3VHANCNFSM4ZX5JK5Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLJISVYBOBWJNBSQKGTTFI3VHA5CNFSM4ZX5JK52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MQSV2DA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3149",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3149",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>