<p>Replacement PR for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="587885166" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2570" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2570/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2570">#2570</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="592011034" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2578" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2578/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2578">#2578</a></p>
<p>This replaces our homegrown regexps (that didn't quite work) with ruby built-in regexps, and uses the termination anchor to ensure that the entire string, not just the first part, is validated.</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/2579'>https://github.com/openstreetmap/openstreetmap-website/pull/2579</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Ensure that urls are only valid if the entire string is a url</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2579/files#diff-3ef1e2237f323b7d4dc1ce1fc11a5c20">app/models/client_application.rb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2579/files#diff-b427d1b388ac6b7a6394ebdc127e1a0b">test/models/client_application_test.rb</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2579.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2579.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2579.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2579.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/2579">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLP2PLCPX6N5PJBS6HLRKNQELANCNFSM4LZDIY2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLI5LUZSS4LEHJN6IATRKNQELA5CNFSM4LZDIY22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4I2JTHRQ.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/2579",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2579",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>