<p>They are escaped properly without the h() call, and doing that just double-escapes them.</p>
<p>As part of <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="545404349" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2494" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2494/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2494">#2494</a> I set my local users to have all kinds of weird usernames, and today I spotted some places where they are being double-escaped. I suspect that almost all our uses of h() have been redundant since rails 3.x, but I haven't checked the rest.</p>
<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/2500'>https://github.com/openstreetmap/openstreetmap-website/pull/2500</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Avoid double-escaping display names when sent through the translation system</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2500/files#diff-0">app/views/diary_entries/show.html.erb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2500/files#diff-1">app/views/messages/new.html.erb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2500/files#diff-2">app/views/user_blocks/blocks_by.html.erb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2500/files#diff-3">app/views/user_blocks/edit.html.erb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2500/files#diff-4">app/views/user_blocks/new.html.erb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2500/files#diff-5">app/views/users/no_such_user.html.erb</a>
(4)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2500.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2500.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2500.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2500.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/2500?email_source=notifications&email_token=AAK2OLPZULHUBFI36LZ4IW3Q4YJ2LA5CNFSM4KEMSKK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IE255UQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMQW7FG6AVFMNYI67DQ4YJ2LANCNFSM4KEMSKKQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLP7AEE5DTNPYJIWZGLQ4YJ2LA5CNFSM4KEMSKK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IE255UQ.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/2500?email_source=notifications\u0026email_token=AAK2OLPZULHUBFI36LZ4IW3Q4YJ2LA5CNFSM4KEMSKK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IE255UQ",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2500?email_source=notifications\u0026email_token=AAK2OLPZULHUBFI36LZ4IW3Q4YJ2LA5CNFSM4KEMSKK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IE255UQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>