<p></p>
<p dir="auto">There's a few things that come up here on further review:</p>
<ul dir="auto">
<li>As hinted at in the comments, I think it's worth removing the markup from the description, rather than outputting it. The PR currently uses "to_text" which just returns the raw content, rather than a text-only representation. So I would prefer to see "something <b>important</b>" be outputted as "something important". We could use the <code class="notranslate">[strip_tags](https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-strip_tags) helper on the </code>to_html` output to do so</li>
<li>The description is shortened by calling <code class="notranslate">[0..300]</code>, but we could use the rails <code class="notranslate">[truncate](https://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-truncate)</code> helper to do this more cleanly.</li>
</ul>
<p dir="auto">I think we can also look at the <a href="https://github.com/kpumuk/meta-tags">meta-tags</a> gem, which doesn't cover the above points, but it could help us with setting defaults etc without having to build our own <code class="notranslate">set_meta_tags</code> equivalent. That could be done in a "prerequisites" pull request (i.e. another PR that introduces that gem, and then this PR refactored to use it).</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3942#issuecomment-1460524150">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMI7BALADKDFTTT6JLW3C5APANCNFSM6AAAAAAVH4K7HM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLO22S5LAZNLLSUBRTTW3C5APA5CNFSM6AAAAAAVH4K7HOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSXBXKHM.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3942/c1460524150</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3942#issuecomment-1460524150",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3942#issuecomment-1460524150",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>