Small fix to not detect 'ok...' as link

This commit is contained in:
Rogerio Chaves 2020-04-26 20:34:40 +02:00
parent 333bc8226e
commit 2e96851bb9
No known key found for this signature in database
GPG Key ID: E6AF5440509B1D94
3 changed files with 3 additions and 2 deletions

View File

@ -145,7 +145,7 @@ app.use((_req, res, next) => {
`<a target="_blank" href="$1">$1</a>`
);
result = result.replace(
/(\s|^)(([a-z-_])*\.\S{2,})/gm, // Domains without http
/(\s|^)(([a-z-_])*(\.[^\s.]{2,})+)/gm, // Domains without http
`$1<a target="_blank" href="http://$2">$2</a>`
);
result = result.replace(/\n/g, "<br />");

View File

@ -25,6 +25,7 @@ input[type="submit"] {
text-decoration: none;
display: inline-block;
height: 33px;
-webkit-appearance: none;
}
button:hover,
a.button:hover,

View File

@ -3,7 +3,7 @@
<p>Welcome to Social, please use the button below to login to your account:</p>
<form action="<%= origin %>/login" method="POST" style="padding: 20px 0">
<input type="hidden" name="ssb_key" value="<%= ssb_key %>" />
<input type="submit" value="Login to Social" style="background: #08d; color: #fff; border-radius: 3px; padding: 8px 10px; border: none; cursor: pointer; text-decoration: none; display: inline-block; padding: 16px 20px; font-size: 18px;">
<input type="submit" value="Login to Social" style="background: #08d; color: #fff; border-radius: 3px; padding: 8px 10px; border: none; cursor: pointer; text-decoration: none; display: inline-block; padding: 16px 20px; font-size: 18px; -webkit-appearance: none;">
</form>
<p>
Never delete or forward this email, it is they key to accessing your account